summary refs log tree commit diff stats
path: root/plugins/upd
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/upd
parent0f9c35e214a7d047286b0d2ae69fcd60b223b9d4 (diff)
don't use hardcoded strings for plugin names
Diffstat (limited to 'plugins/upd')
-rw-r--r--plugins/upd/upd.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/plugins/upd/upd.c b/plugins/upd/upd.c
index 3eec06dc..7ab5edca 100644
--- a/plugins/upd/upd.c
+++ b/plugins/upd/upd.c
@@ -26,6 +26,9 @@
 #include "xchat-plugin.h"
 
 static xchat_plugin *ph;   /* plugin handle */
+static const char name[] = "Update Checker";
+static const char desc[] = "Check for XChat-WDK updates automatically";
+static const char version[] = "2.0";
 
 /* we need this to store the result of the initial update check since the return value is preserved for XCHAT_EAT */
 static int update_available;
@@ -117,14 +120,14 @@ xchat_plugin_init (xchat_plugin *plugin_handle, char **plugin_name, char **plugi
 {
 	ph = plugin_handle;
 
-	*plugin_name = "Update Checker";
-	*plugin_desc = "Plugin for checking for XChat-WDK updates";
-	*plugin_version = "2.0";
+	*plugin_name = name;
+	*plugin_desc = desc;
+	*plugin_version = version;
 
 	xchat_hook_command (ph, "UPDCHK", XCHAT_PRI_NORM, print_version, 0, 0);
 	xchat_command (ph, "MENU -ietc\\download.png ADD \"Help/Check for Updates\" \"UPDCHK\"");
 
-	xchat_printf (ph, "%s plugin loaded\n", *plugin_name);
+	xchat_printf (ph, "%s plugin loaded\n", name);
 
 	/* only start the timer if there's no update available during startup */
 	if (!update_available)
@@ -140,6 +143,6 @@ int
 xchat_plugin_deinit (void)
 {
 	xchat_command (ph, "MENU DEL \"Help/Check for updates\"");
-	xchat_print (ph, "Update Checker plugin unloaded\n");
+	xchat_printf (ph, "%s plugin unloaded\n", name);
 	return 1;
 }