summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-01-01 17:15:22 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-01-01 17:15:22 +0100
commitc02f32070cf3cf01acb82db6a833d89c66d36056 (patch)
tree9eee7af523ac37ca72354ca6fe389e6d8c7fd963
parent8a371fc1aa7cee4b5d0b021fe1be814c792799c6 (diff)
downloadweechat-c02f32070cf3cf01acb82db6a833d89c66d36056.zip
Fix buffer used to display IRC notice sent to channel or nick (bug #28455)
-rw-r--r--src/plugins/irc/irc-command.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index 79d0789f2..ecd4cadd5 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -2234,6 +2234,7 @@ irc_command_notice (void *data, struct t_gui_buffer *buffer, int argc,
{
char *string;
int arg_nick, arg_text;
+ struct t_irc_channel *ptr_channel;
IRC_GET_SERVER(buffer);
@@ -2255,9 +2256,12 @@ irc_command_notice (void *data, struct t_gui_buffer *buffer, int argc,
string = irc_color_decode (argv_eol[arg_text],
weechat_config_boolean (irc_config_network_colors_receive));
- weechat_printf (ptr_server->buffer,
- "Notice -> %s%s%s: %s",
- IRC_COLOR_CHAT_NICK,
+ ptr_channel = irc_channel_search (ptr_server, argv[arg_nick]);
+ weechat_printf ((ptr_channel) ? ptr_channel->buffer : ptr_server->buffer,
+ "%sNotice -> %s%s%s: %s",
+ weechat_prefix ("network"),
+ (irc_channel_is_channel (argv[arg_nick])) ?
+ IRC_COLOR_CHAT_CHANNEL : IRC_COLOR_CHAT_NICK,
argv[arg_nick],
IRC_COLOR_CHAT,
(string) ? string : argv_eol[arg_text]);