summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-12-01 16:14:08 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-12-01 16:14:08 +0000
commitd1d41da7ad46d7c7fe82406ead14ba7972efa416 (patch)
tree899d860df314f2a84d496ecbeae495f87365ffed /src
parent3ba99d6d7136a84a8f0c7169485c9b519669ae9d (diff)
downloadweechat-d1d41da7ad46d7c7fe82406ead14ba7972efa416.zip
Plugins: "add_message_handler" now accepts "*" for all IRC messages
Diffstat (limited to 'src')
-rw-r--r--src/plugins/plugins.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c
index 2932f10c2..4d9970384 100644
--- a/src/plugins/plugins.c
+++ b/src/plugins/plugins.c
@@ -472,7 +472,9 @@ plugin_msg_handler_exec (char *server, char *irc_command, char *irc_message)
ptr_handler; ptr_handler = ptr_handler->next_handler)
{
if ((ptr_handler->type == PLUGIN_HANDLER_MESSAGE)
- && (ascii_strcasecmp (ptr_handler->irc_command, irc_command) == 0))
+ && (((ascii_strcasecmp (ptr_handler->irc_command, "*") == 0)
+ && (ascii_strncasecmp (irc_command, "weechat_", 8) != 0))
+ || (ascii_strcasecmp (ptr_handler->irc_command, irc_command) == 0)))
{
if (ptr_handler->running == 0)
{