diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-05-29 09:18:19 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-05-29 09:18:19 +0200 |
commit | b36ed393886c6b6a8fec6397b37b555dd4922592 (patch) | |
tree | 369ba3df6c16eb3bcf22c813022dc0a3df489206 /src/plugins/irc/irc-protocol.c | |
parent | f93eec488e1826d9fb1a49a8aecbaa6b4ab2647b (diff) | |
download | weechat-b36ed393886c6b6a8fec6397b37b555dd4922592.zip |
Fix bug with nick prefix '*' (chan founder) on some IRC servers (bug #29890)
Diffstat (limited to 'src/plugins/irc/irc-protocol.c')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 40de6c864..4911e1ab3 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -687,7 +687,7 @@ IRC_PROTOCOL_CALLBACK(kick) * my nick was kicked => free all nicks, channel is not active any * more */ - irc_nick_free_all (ptr_channel); + irc_nick_free_all (server, ptr_channel); if (IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOREJOIN)) { if (IRC_SERVER_OPTION_INTEGER(server, IRC_SERVER_OPTION_AUTOREJOIN_DELAY) == 0) @@ -713,7 +713,7 @@ IRC_PROTOCOL_CALLBACK(kick) * nick */ if (ptr_nick_kicked) - irc_nick_free (ptr_channel, ptr_nick_kicked); + irc_nick_free (server, ptr_channel, ptr_nick_kicked); } return WEECHAT_RC_OK; @@ -782,7 +782,7 @@ IRC_PROTOCOL_CALLBACK(kill) * my nick was killed => free all nicks, channel is not active any * more */ - irc_nick_free_all (ptr_channel); + irc_nick_free_all (server, ptr_channel); } else { @@ -791,7 +791,7 @@ IRC_PROTOCOL_CALLBACK(kill) * nick */ if (ptr_nick_killed) - irc_nick_free (ptr_channel, ptr_nick_killed); + irc_nick_free (server, ptr_channel, ptr_nick_killed); } } @@ -1096,7 +1096,7 @@ IRC_PROTOCOL_CALLBACK(notice) irc_protocol_tags (command, "notify_private"), "%s%s", - irc_nick_as_prefix (NULL, nick, + irc_nick_as_prefix (server, NULL, nick, irc_nick_color_for_pv (ptr_channel, nick)), pos_args); if ((ptr_channel->type == IRC_CHANNEL_TYPE_PRIVATE) @@ -1259,7 +1259,7 @@ IRC_PROTOCOL_CALLBACK(part) /* part request was issued by local client ? */ if (local_part) { - irc_nick_free_all (ptr_channel); + irc_nick_free_all (server, ptr_channel); /* cycling ? => rejoin channel immediately */ if (ptr_channel->cycle) @@ -1291,7 +1291,7 @@ IRC_PROTOCOL_CALLBACK(part) } } else - irc_nick_free (ptr_channel, ptr_nick); + irc_nick_free (server, ptr_channel, ptr_nick); } } @@ -1402,7 +1402,7 @@ IRC_PROTOCOL_CALLBACK(privmsg) irc_protocol_tags (command, "notify_message"), "%s%s", - irc_nick_as_prefix (ptr_nick, + irc_nick_as_prefix (server, ptr_nick, (ptr_nick) ? NULL : nick, NULL), pos_args); @@ -1470,8 +1470,7 @@ IRC_PROTOCOL_CALLBACK(privmsg) "notify_private,no_highlight" : "notify_private"), "%s%s", - irc_nick_as_prefix (NULL, - nick, + irc_nick_as_prefix (server, NULL, nick, (nick_is_me) ? IRC_COLOR_CHAT_NICK_SELF : irc_nick_color_for_pv (ptr_channel, nick)), pos_args); @@ -1584,7 +1583,7 @@ IRC_PROTOCOL_CALLBACK(quit) } } if (ptr_nick) - irc_nick_free (ptr_channel, ptr_nick); + irc_nick_free (server, ptr_channel, ptr_nick); } } @@ -3268,7 +3267,7 @@ IRC_PROTOCOL_CALLBACK(353) { prefix_found = 0; - if (irc_mode_get_nick_prefix (server, NULL, pos_nick[0]) >= 0) + if (irc_mode_get_nick_attr (server, NULL, pos_nick[0]) >= 0) { prefix_found = 1; switch (pos_nick[0]) @@ -3281,6 +3280,10 @@ IRC_PROTOCOL_CALLBACK(353) is_chanowner = 1; color = IRC_COLOR_NICKLIST_PREFIX1; break; + case '*': /* channel owner */ + is_chanowner = 1; + color = IRC_COLOR_NICKLIST_PREFIX1; + break; case '&': /* channel admin */ is_chanadmin = 1; color = IRC_COLOR_NICKLIST_PREFIX1; |