summary refs log tree commit diff stats
path: root/plugins/exec
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2011-12-02 01:05:59 +0100
committerBerke Viktor <berkeviktor@aol.com>2011-12-02 01:05:59 +0100
commite2acf19d42b874eecd1b142a0e1192721fb295f5 (patch)
treed8f87bc51a4b67d3e74e51446aee0ecbb2a8ba89 /plugins/exec
parent0f9c35e214a7d047286b0d2ae69fcd60b223b9d4 (diff)
don't use hardcoded strings for plugin names
Diffstat (limited to 'plugins/exec')
-rw-r--r--plugins/exec/exec.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/exec/exec.c b/plugins/exec/exec.c
index b043ae83..fc8c8ec9 100644
--- a/plugins/exec/exec.c
+++ b/plugins/exec/exec.c
@@ -26,6 +26,9 @@
 #include "xchat-plugin.h"
 
 static xchat_plugin *ph;   /* plugin handle */
+static const char name[] = "Exec";
+static const char desc[] = "Execute commands inside XChat";
+static const char version[] = "1.0";
 
 static int
 run_command (char *word[], char *word_eol[], void *userdata)
@@ -107,12 +110,12 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
 {
 	ph = plugin_handle;
 
-	*plugin_name = "Exec";
-	*plugin_desc = "Execute commands inside XChat";
-	*plugin_version = "1.0";
+	*plugin_name = name;
+	*plugin_desc = desc;
+	*plugin_version = version;
 
 	xchat_hook_command (ph, "EXEC", XCHAT_PRI_NORM, run_command, 0, 0);
-	xchat_printf (ph, "%s plugin loaded\n", *plugin_name);
+	xchat_printf (ph, "%s plugin loaded\n", name);
 
 	return 1;       /* return 1 for success */
 }
@@ -120,6 +123,6 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
 int
 xchat_plugin_deinit (void)
 {
-	xchat_print (ph, "Exec plugin unloaded\n");
+	xchat_print (ph, "%s plugin unloaded\n", name);
 	return 1;
 }