summaryrefslogtreecommitdiff
path: root/src/plugins/irc/irc-ctcp.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-01-27 18:18:35 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-01-27 18:18:35 +0100
commitb6a7777aa0c940261d87f25dd09d73e05cae6b27 (patch)
treee77e641a4e62d2ba40afdf5a17b725980d4d4248 /src/plugins/irc/irc-ctcp.c
parentf8a25b4299909a4021ac9e59597078072cfe8103 (diff)
downloadweechat-b6a7777aa0c940261d87f25dd09d73e05cae6b27.zip
irc: add alias "ctcp" for target buffer of CTCP messages
Diffstat (limited to 'src/plugins/irc/irc-ctcp.c')
-rw-r--r--src/plugins/irc/irc-ctcp.c34
1 files changed, 27 insertions, 7 deletions
diff --git a/src/plugins/irc/irc-ctcp.c b/src/plugins/irc/irc-ctcp.c
index aa0aa4f46..f2fafdeae 100644
--- a/src/plugins/irc/irc-ctcp.c
+++ b/src/plugins/irc/irc-ctcp.c
@@ -34,6 +34,7 @@
#include "irc-channel.h"
#include "irc-color.h"
#include "irc-config.h"
+#include "irc-msgbuffer.h"
#include "irc-nick.h"
#include "irc-protocol.h"
#include "irc-server.h"
@@ -120,7 +121,9 @@ irc_ctcp_display_request (struct t_irc_server *server,
&& !weechat_config_boolean (irc_config_look_display_ctcp_blocked))
return;
- weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server, nick,
+ NULL, "ctcp",
+ (channel) ? channel->buffer : NULL),
irc_protocol_tags (command, "irc_ctcp", NULL),
_("%sCTCP requested by %s%s%s: %s%s%s%s%s%s"),
weechat_prefix ("network"),
@@ -178,8 +181,11 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
difftime = ((sec2 * 1000000) + usec2) -
((sec1 * 1000000) + usec1);
-
- weechat_printf_tags (server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server,
+ nick,
+ NULL,
+ "ctcp",
+ NULL),
irc_protocol_tags (command,
"irc_ctcp",
NULL),
@@ -202,7 +208,11 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
}
else
{
- weechat_printf_tags (server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server,
+ nick,
+ NULL,
+ "ctcp",
+ NULL),
irc_protocol_tags (command,
"irc_ctcp",
NULL),
@@ -221,7 +231,9 @@ irc_ctcp_display_reply_from_nick (struct t_irc_server *server,
}
else
{
- weechat_printf_tags (server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server, nick,
+ NULL, "ctcp",
+ NULL),
irc_protocol_tags (command, NULL, NULL),
_("%sCTCP reply from %s%s%s: %s%s%s%s%s"),
weechat_prefix ("network"),
@@ -277,7 +289,11 @@ irc_ctcp_reply_to_nick (struct t_irc_server *server,
str_args = weechat_hashtable_get (hashtable, hash_key);
if (!str_args)
break;
- weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server,
+ nick,
+ NULL,
+ "ctcp",
+ (channel) ? channel->buffer : NULL),
irc_protocol_tags (command,
"irc_ctcp,irc_ctcp_reply,"
"notify_none,no_highlight",
@@ -1010,7 +1026,11 @@ irc_ctcp_recv (struct t_irc_server *server, const char *command,
{
if (weechat_config_boolean (irc_config_look_display_ctcp_unknown))
{
- weechat_printf_tags ((channel) ? channel->buffer : server->buffer,
+ weechat_printf_tags (irc_msgbuffer_get_target_buffer (server,
+ nick,
+ NULL,
+ "ctcp",
+ (channel) ? channel->buffer : NULL),
irc_protocol_tags (command,
"irc_ctcp",
NULL),