summary refs log tree commit diff stats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/python/python.c20
-rw-r--r--plugins/sysinfo/sysinfo.cpp3
2 files changed, 14 insertions, 9 deletions
diff --git a/plugins/python/python.c b/plugins/python/python.c
index 0fed65ca..d5a2aba8 100644
--- a/plugins/python/python.c
+++ b/plugins/python/python.c
@@ -498,18 +498,20 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 	PyObject *retobj;
 	PyObject *word_list, *word_eol_list;
 	int ret = 0;
+	PyObject *plugin;
 
-	BEGIN_PLUGIN(hook->plugin);
+	plugin = hook->plugin;
+	BEGIN_PLUGIN(plugin);
 
 	word_list = Util_BuildList(word+1);
 	if (word_list == NULL) {
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 	word_eol_list = Util_BuildList(word_eol+1);
 	if (word_eol_list == NULL) {
 		Py_DECREF(word_list);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 
@@ -528,7 +530,7 @@ Callback_Command(char *word[], char *word_eol[], void *userdata)
 		PyErr_Print();
 	}
 
-	END_PLUGIN(hook->plugin);
+	END_PLUGIN(plugin);
 
 	return ret;
 }
@@ -548,6 +550,7 @@ Callback_Print(char *word[], void *userdata)
 	int next = 0;
 	int i;
 	int ret = 0;
+	PyObject *plugin;
 
 	/* Cut off the message identifier. */
 	word += 1;
@@ -579,13 +582,14 @@ Callback_Print(char *word[], void *userdata)
 	}
 	word_eol[i] = "";
 
-	BEGIN_PLUGIN(hook->plugin);
+	plugin = hook->plugin;
+	BEGIN_PLUGIN(plugin);
 
 	word_list = Util_BuildList(word);
 	if (word_list == NULL) {
 		g_free(word_eol_raw);
 		g_free(word_eol);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 	word_eol_list = Util_BuildList(word_eol);
@@ -593,7 +597,7 @@ Callback_Print(char *word[], void *userdata)
 		g_free(word_eol_raw);
 		g_free(word_eol);
 		Py_DECREF(word_list);
-		END_PLUGIN(hook->plugin);
+		END_PLUGIN(plugin);
 		return 0;
 	}
 
@@ -614,7 +618,7 @@ Callback_Print(char *word[], void *userdata)
 		PyErr_Print();
 	}
 
-	END_PLUGIN(hook->plugin);
+	END_PLUGIN(plugin);
 
 	return ret;
 }
diff --git a/plugins/sysinfo/sysinfo.cpp b/plugins/sysinfo/sysinfo.cpp
index 4c307957..7412d0d2 100644
--- a/plugins/sysinfo/sysinfo.cpp
+++ b/plugins/sysinfo/sysinfo.cpp
@@ -31,6 +31,7 @@ static hexchat_plugin *ph;   /* plugin handle */
 static char name[] = "SysInfo";
 static char desc[] = "Display info about your hardware and OS";
 static char version[] = "1.1";
+static char helptext[] = "USAGE: /sysinfo - Sends info about your hardware and OS to current channel.";
 static int firstRun;
 static char *wmiOs;
 static char *wmiCpu;
@@ -397,7 +398,7 @@ hexchat_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, char **p
 
 	firstRun = 1;
 
-	hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, NULL, NULL);
+	hexchat_hook_command (ph, "SYSINFO", HEXCHAT_PRI_NORM, printInfo, helptext, NULL);
 	hexchat_command (ph, "MENU -ishare\\system.png ADD \"Window/Display System Info\" \"SYSINFO\"");
 
 	hexchat_printf (ph, "%s plugin loaded\n", name);