diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-22 21:30:19 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-22 21:30:19 +0000 |
commit | 8cd841044813966b08804bfbd38a316d1ec3a659 (patch) | |
tree | 94f8bd1d6f3d8bbeef5a25594730b7d8229e1d32 /src/plugins/plugins.c | |
parent | 1cbdbffa4057c06ab1743b85032d73601b34b7e0 (diff) | |
download | weechat-8cd841044813966b08804bfbd38a316d1ec3a659.zip |
Fixed bugs: buffer detection in plugins/scripts commands, and /history command
Diffstat (limited to 'src/plugins/plugins.c')
-rw-r--r-- | src/plugins/plugins.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/plugins.c b/src/plugins/plugins.c index 80b87922f..904eb06f8 100644 --- a/src/plugins/plugins.c +++ b/src/plugins/plugins.c @@ -51,7 +51,7 @@ t_weechat_plugin *last_weechat_plugin = NULL; * plugin_find_server_channel: find server/channel for command execution */ -void +int plugin_find_server_channel (char *server, char *channel, t_irc_server **ptr_server, t_irc_channel **ptr_channel) @@ -70,7 +70,11 @@ plugin_find_server_channel (char *server, char *channel, else { if (server && server[0]) + { (*ptr_server) = server_search (server); + if (!(*ptr_server)) + return -1; + } else { (*ptr_server) = SERVER(gui_current_window->buffer); @@ -82,8 +86,11 @@ plugin_find_server_channel (char *server, char *channel, { if ((*ptr_server)) (*ptr_channel) = channel_search ((*ptr_server), channel); + if (!(*ptr_channel)) + return -1; } } + return 0; } /* |