summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2015-01-25 17:27:16 +0100
committerSébastien Helleu <flashcode@flashtux.org>2015-01-25 17:34:22 +0100
commit5559b43518033d36e7d91cb998aa9d712e957649 (patch)
treed8d57ac2e9ca6e71914158daa8b7429db37af828 /src/plugins
parent4c1e13fd453596d4cdf86208d3dd3e117aa229e5 (diff)
downloadweechat-5559b43518033d36e7d91cb998aa9d712e957649.zip
irc: set away flag to 0 only if channel and nick are found
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-protocol.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index cea5d6b6b..2ef0b051e 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4282,18 +4282,24 @@ IRC_PROTOCOL_CALLBACK(354)
}
/* update away flag for nick */
- if (ptr_channel && ptr_nick && pos_attr
- && (server->cap_away_notify
- || ((IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AWAY_CHECK) > 0)
- && ((IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS) == 0)
- || (ptr_channel->nicks_count <= IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS))))))
- {
- irc_nick_set_away (server, ptr_channel, ptr_nick,
- (pos_attr[0] == 'G') ? 1 : 0);
- }
- else
- {
- irc_nick_set_away (server, ptr_channel, ptr_nick, 0);
+ if (ptr_channel && ptr_nick)
+ {
+ if (pos_attr
+ && (server->cap_away_notify
+ || ((IRC_SERVER_OPTION_INTEGER(
+ server, IRC_SERVER_OPTION_AWAY_CHECK) > 0)
+ && ((IRC_SERVER_OPTION_INTEGER(
+ server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS) == 0)
+ || (ptr_channel->nicks_count <= IRC_SERVER_OPTION_INTEGER(
+ server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS))))))
+ {
+ irc_nick_set_away (server, ptr_channel, ptr_nick,
+ (pos_attr[0] == 'G') ? 1 : 0);
+ }
+ else
+ {
+ irc_nick_set_away (server, ptr_channel, ptr_nick, 0);
+ }
}
/* update account flag for nick */