diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 24 | ||||
-rw-r--r-- | src/plugins/irc/irc-channel.h | 2 | ||||
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 5 |
3 files changed, 29 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 0e56d8acc..4445a3151 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -679,6 +679,25 @@ irc_channel_get_auto_chantype (struct t_irc_server *server, } /* + * Removes account for all nicks on a channel. + */ + +void +irc_channel_remove_account (struct t_irc_server *server, + struct t_irc_channel *channel) +{ + struct t_irc_nick *ptr_nick; + + if (channel->type == IRC_CHANNEL_TYPE_CHANNEL) + { + for (ptr_nick = channel->nicks; ptr_nick; ptr_nick = ptr_nick->next_nick) + { + ptr_nick->account = strdup ("*"); + } + } +} + +/* * Removes away for all nicks on a channel. */ @@ -698,7 +717,7 @@ irc_channel_remove_away (struct t_irc_server *server, } /* - * Checks for away on a channel. + * Checks for WHOX information on a channel. */ void @@ -718,7 +737,10 @@ irc_channel_check_whox (struct t_irc_server *server, "WHO %s %%cuhsnfdar", channel->name); } else + { + irc_channel_remove_account(server, channel); irc_channel_remove_away(server, channel); + } } } diff --git a/src/plugins/irc/irc-channel.h b/src/plugins/irc/irc-channel.h index c8ff8a6b7..f6141c84d 100644 --- a/src/plugins/irc/irc-channel.h +++ b/src/plugins/irc/irc-channel.h @@ -107,6 +107,8 @@ extern int irc_channel_is_channel (struct t_irc_server *server, const char *string); extern const char *irc_channel_get_auto_chantype (struct t_irc_server *server, const char *channel_name); +extern void irc_channel_remove_account (struct t_irc_server *server, + struct t_irc_channel *channel); extern void irc_channel_remove_away (struct t_irc_server *server, struct t_irc_channel *channel); extern void irc_channel_check_whox (struct t_irc_server *server, diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index bd2685c23..84b1f6d83 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -318,7 +318,10 @@ IRC_PROTOCOL_CALLBACK(account) { if (ptr_nick->account) free (ptr_nick->account); - ptr_nick->account = strdup (argv[2]); + if (server->cap_account_notify) + ptr_nick->account = strdup (argv[2]); + else + ptr_nick->account = strdup ("*"); } } |