changeset 12987:750968cab201

[gaim-migrate @ 15340] This should fix tcl scripts the same way I fixed perl scripts, all tcl scripts will now have ids. Ethan, you are going to want to make sure I fixed this in a way you find appropriate. committer: Tailor Script <tailor@pidgin.im>
author Etan Reisner <pidgin@unreliablesource.net>
date Sun, 22 Jan 2006 07:37:22 +0000
parents 4e9935a539db
children b457aa723bab
files plugins/tcl/tcl.c
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/tcl/tcl.c	Sun Jan 22 07:09:06 2006 +0000
+++ b/plugins/tcl/tcl.c	Sun Jan 22 07:37:22 2006 +0000
@@ -219,7 +219,7 @@
 		if (Tcl_EvalEx(interp, "plugin_init", -1, TCL_EVAL_GLOBAL) == TCL_OK) {
 			result = Tcl_GetObjResult(interp);
 			if (Tcl_ListObjGetElements(interp, result, &nelems, &listitems) == TCL_OK) {
-				if (nelems == 6) {
+				if ((nelems == 6) || (nelems == 7)) {
 					info = g_new0(GaimPluginInfo, 1);
 
 					info->magic = GAIM_PLUGIN_MAGIC;
@@ -235,6 +235,11 @@
 					info->author = g_strdup(Tcl_GetString(listitems[4]));
 					info->homepage = g_strdup(Tcl_GetString(listitems[5]));
 
+					if (nelems == 6)
+						info->id = g_strdup_printf("tcl-%s", Tcl_GetString(listitems[0]));
+					else if (nelems == 7)
+						info->id = g_strdup_printf("tcl-%s", Tcl_GetString(listitems[6]));
+
 					plugin->info = info;
 
 					if (gaim_plugin_register(plugin))