summary refs log tree commit diff stats
path: root/plugins/perl
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-08-04 04:36:10 -0400
committerTingPing <tingping@tingping.se>2013-08-04 04:36:10 -0400
commite8456beadc9c065b52291ebdc552564d0a1d9069 (patch)
tree4a48b30b0f7e88d67b24c046b7e18370eeaae3d6 /plugins/perl
parentbdc814a4a410610d8aee2211b13a3a86fe477dd3 (diff)
Add reload command for plugins and add to gui
Diffstat (limited to 'plugins/perl')
-rw-r--r--plugins/perl/perl.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c
index 732fd65c..abb66c5a 100644
--- a/plugins/perl/perl.c
+++ b/plugins/perl/perl.c
@@ -1520,7 +1520,7 @@ perl_command_unload (char *word[], char *word_eol[], void *userdata)
 }
 
 static int
-perl_command_reload (char *word[], char *word_eol[], void *userdata)
+perl_command_reload (char *word[], char *word_eol[], void *eat)
 {
 	char *file = get_filename (word, word_eol);
 	
@@ -1529,7 +1529,10 @@ perl_command_reload (char *word[], char *word_eol[], void *userdata)
 		return HEXCHAT_EAT_HEXCHAT;
 	}
 	
-	return HEXCHAT_EAT_HEXCHAT;
+	if (eat)
+		return HEXCHAT_EAT_HEXCHAT;
+	else
+		return HEXCHAT_EAT_NONE;
 }
 
 void
@@ -1570,7 +1573,7 @@ hexchat_plugin_init (hexchat_plugin * plugin_handle, char **plugin_name,
 	hexchat_hook_command (ph, "reload", HEXCHAT_PRI_NORM, perl_command_reload, 0,
 							  0);
 	hexchat_hook_command (ph, "pl_reload", HEXCHAT_PRI_NORM, perl_command_reload, 0,
-							  0);
+							  (int*)1);
 	hexchat_hook_command (ph, "unloadall", HEXCHAT_PRI_NORM,
 							  perl_command_unloadall, 0, 0);
 	hexchat_hook_command (ph, "reloadall", HEXCHAT_PRI_NORM,