1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-26 04:46:37 +02:00

irc: fix bug with prefix chars which are in chanmodes with a type different from "B" (bug #36996)

This commit is contained in:
Sebastien Helleu
2012-07-30 14:33:36 +02:00
parent 3f973f8cbc
commit 048b05cb29
2 changed files with 11 additions and 5 deletions
+3 -1
View File
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
v0.3.9-dev, 2012-07-29
v0.3.9-dev, 2012-07-30
Version 0.3.9 (under dev!)
@@ -41,6 +41,8 @@ Version 0.3.9 (under dev!)
internal WeeChat charset)
* guile: fix crash when unloading a script without pointer to interpreter
* guile: fix path of guile include dirs in cmake build (patch #7790)
* irc: fix bug with prefix chars which are in chanmodes with a type different
from "B" (bug #36996)
* irc: fix format of message "USER" (according to RFC 2812) (bug #36825)
* irc: add bar item "buffer_modes", remove option irc.look.item_channel_modes
(task #12022)
+8 -4
View File
@@ -58,6 +58,14 @@ irc_mode_get_chanmode_type (struct t_irc_server *server, char chanmode)
char chanmode_type, *pos;
const char *chanmodes, *ptr_chanmodes;
/*
* assume it is type 'B' if mode is in prefix
* (we first check that because some exotic servers like irc.webchat.org
* include the prefix chars in chanmodes as type 'A', which is wrong)
*/
if (irc_server_get_prefix_mode_index (server, chanmode) >= 0)
return 'B';
chanmodes = irc_server_get_chanmodes (server);
pos = strchr (chanmodes, chanmode);
if (pos)
@@ -75,10 +83,6 @@ irc_mode_get_chanmode_type (struct t_irc_server *server, char chanmode)
return chanmode_type;
}
/* assume it is type 'B' if mode is not in chanmodes but in prefix */
if (irc_server_get_prefix_mode_index (server, chanmode) >= 0)
return 'B';
/* unknown mode, type 'D' by default */
return 'D';
}