diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-07-01 11:56:06 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-07-01 11:56:06 +0200 |
commit | 7585eae5d0b2bfc2b445bd04e16ba5eb10b76026 (patch) | |
tree | 8746f58075e6b6de0b93c07252af07a2f658edec | |
parent | c92d34020b7a38b2924b0612a2e4add69ee32273 (diff) | |
download | weechat-7585eae5d0b2bfc2b445bd04e16ba5eb10b76026.zip |
irc: fix parsing of user modes (ignore everything after first space) (bug #36756)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-mode.c | 8 |
2 files changed, 10 insertions, 2 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.9-dev, 2012-06-30 +v0.3.9-dev, 2012-07-01 Version 0.3.9 (under dev!) @@ -18,6 +18,8 @@ Version 0.3.9 (under dev!) (bug #36584) * 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 parsing of user modes (ignore everything after first space) + (bug #36756) * irc: add option irc.look.ctcp_time_format to customize reply to CTCP TIME (task #12150) * irc: fix freeze when reading on socket with SSL enabled (bug #35097) diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c index 214ee56a7..29970ea3e 100644 --- a/src/plugins/irc/irc-mode.c +++ b/src/plugins/irc/irc-mode.c @@ -473,6 +473,7 @@ irc_mode_user_set (struct t_irc_server *server, const char *modes, int reset_modes) { char set_flag; + int end; if (reset_modes) { @@ -483,12 +484,15 @@ irc_mode_user_set (struct t_irc_server *server, const char *modes, } } set_flag = '+'; + end = 0; while (modes && modes[0]) { switch (modes[0]) { - case ':': case ' ': + end = 1; + break; + case ':': break; case '+': set_flag = '+'; @@ -503,6 +507,8 @@ irc_mode_user_set (struct t_irc_server *server, const char *modes, irc_mode_user_remove (server, modes[0]); break; } + if (end) + break; modes++; } weechat_bar_item_update ("input_prompt"); |