irc: always set nick away status on WHO response (sent manually or automatically with server option "away_check")
This commit is contained in:
parent
8fd2a909b4
commit
70a930516d
@ -30,6 +30,7 @@ Improvements::
|
||||
|
||||
Bug fixes::
|
||||
|
||||
* irc: always set nick away status on WHO response (sent manually or automatically with server option "away_check")
|
||||
* irc: fix a crash when calling the function hdata_string on the "prefix" variable in the nick
|
||||
* irc: fix split of messages when server option "split_msg_max_length" is set to 0 (no split) (issue #1173)
|
||||
* irc: send whole IRC message including IRCv3 tags in the signals irc_in, irc_in2, irc_raw_in and irc_raw_in2 (issue #787)
|
||||
|
@ -749,18 +749,11 @@ void
|
||||
irc_nick_set_away (struct t_irc_server *server, struct t_irc_channel *channel,
|
||||
struct t_irc_nick *nick, int is_away)
|
||||
{
|
||||
if (!is_away
|
||||
|| 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)
|
||||
|| (channel->nicks_count <= IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AWAY_CHECK_MAX_NICKS)))))
|
||||
if (is_away != nick->away)
|
||||
{
|
||||
if ((is_away && !nick->away) || (!is_away && nick->away))
|
||||
{
|
||||
nick->away = is_away;
|
||||
irc_nick_nicklist_set (channel, nick, "color",
|
||||
irc_nick_get_color_for_nicklist (server, nick));
|
||||
}
|
||||
nick->away = is_away;
|
||||
irc_nick_nicklist_set (channel, nick, "color",
|
||||
irc_nick_get_color_for_nicklist (server, nick));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4555,22 +4555,8 @@ IRC_PROTOCOL_CALLBACK(354)
|
||||
/* update away flag in nick */
|
||||
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);
|
||||
}
|
||||
irc_nick_set_away (server, ptr_channel, ptr_nick,
|
||||
(pos_attr && (pos_attr[0] == 'G')) ? 1 : 0);
|
||||
}
|
||||
|
||||
/* update account flag in nick */
|
||||
|
Loading…
x
Reference in New Issue
Block a user