summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-02-10 16:22:34 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-02-10 16:22:34 +0100
commit124634cf88481033370f51908fd1f310c1a90590 (patch)
tree92bce5f4ef87100fe5922ce8be8eb99bec6098be /src
parent4b6bd6a923cb391f6c02c14719c1aaaa120a5855 (diff)
downloadweechat-124634cf88481033370f51908fd1f310c1a90590.zip
Apply IRC smart filter only on channels, not private buffers (bug #28841)
Diffstat (limited to 'src')
-rw-r--r--src/plugins/irc/irc-protocol.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 3cad0588b..fb20722ce 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -958,14 +958,19 @@ irc_protocol_cmd_part (struct t_irc_server *server, const char *command,
/* display part message */
if (!irc_ignore_check (server, ptr_channel, nick, host))
{
- ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter))
- && (weechat_config_boolean (irc_config_look_smart_filter_quit))) ?
- irc_channel_nick_speaking_time_search (ptr_channel, nick, 1) : NULL;
+ ptr_nick_speaking = NULL;
+ if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
+ {
+ ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter))
+ && (weechat_config_boolean (irc_config_look_smart_filter_quit))) ?
+ irc_channel_nick_speaking_time_search (ptr_channel, nick, 1) : NULL;
+ }
if (pos_comment)
{
weechat_printf_tags (ptr_channel->buffer,
irc_protocol_tags (command,
(local_part
+ || (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL)
|| !weechat_config_boolean (irc_config_look_smart_filter)
|| !weechat_config_boolean (irc_config_look_smart_filter_quit)
|| ptr_nick_speaking) ?
@@ -993,6 +998,7 @@ irc_protocol_cmd_part (struct t_irc_server *server, const char *command,
weechat_printf_tags (ptr_channel->buffer,
irc_protocol_tags (command,
(local_part
+ || (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL)
|| !weechat_config_boolean (irc_config_look_smart_filter)
|| !weechat_config_boolean (irc_config_look_smart_filter_quit)
|| ptr_nick_speaking) ?
@@ -1296,14 +1302,19 @@ irc_protocol_cmd_quit (struct t_irc_server *server, const char *command,
if (!irc_ignore_check (server, ptr_channel, nick, host))
{
local_quit = (strcmp (nick, server->nick) == 0);
- ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter))
- && (weechat_config_boolean (irc_config_look_smart_filter_quit))) ?
- irc_channel_nick_speaking_time_search (ptr_channel, nick, 1) : NULL;
+ ptr_nick_speaking = NULL;
+ if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
+ {
+ ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter))
+ && (weechat_config_boolean (irc_config_look_smart_filter_quit))) ?
+ irc_channel_nick_speaking_time_search (ptr_channel, nick, 1) : NULL;
+ }
if (pos_comment && pos_comment[0])
{
weechat_printf_tags (ptr_channel->buffer,
irc_protocol_tags (command,
(local_quit
+ || (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL)
|| !weechat_config_boolean (irc_config_look_smart_filter)
|| !weechat_config_boolean (irc_config_look_smart_filter_quit)
|| ptr_nick_speaking) ?
@@ -1329,6 +1340,7 @@ irc_protocol_cmd_quit (struct t_irc_server *server, const char *command,
weechat_printf_tags (ptr_channel->buffer,
irc_protocol_tags (command,
(local_quit
+ || (ptr_channel->type != IRC_CHANNEL_TYPE_CHANNEL)
|| !weechat_config_boolean (irc_config_look_smart_filter)
|| !weechat_config_boolean (irc_config_look_smart_filter_quit)
|| ptr_nick_speaking) ?