[gaim-migrate @ 15340]

Sun, 22 Jan 2006 07:37:22 +0000

author
Etan Reisner <deryni@pidgin.im>
date
Sun, 22 Jan 2006 07:37:22 +0000
changeset 12987
b451eafc33bc
parent 12986
e703bae82e26
child 12988
2a53945982f5

[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.

plugins/tcl/tcl.c file | annotate | diff | comparison | revisions
--- 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))

mercurial