diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-05-02 12:42:44 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-05-02 12:42:44 +0200 |
commit | 0b73835e8ad290c8d5545e540f7745af2a959c15 (patch) | |
tree | 191c9c4940b510ffc2931752d444dc6720a9efdf | |
parent | c01aaf9335073088c744084e95edbe1a7e78d0f1 (diff) | |
download | weechat-0b73835e8ad290c8d5545e540f7745af2a959c15.zip |
irc: hide everything after "identify" or "register" in messages to nickserv when option irc.look.hide_nickserv_pwd is on (bug #36362)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/plugins/irc/irc-display.c | 26 |
2 files changed, 5 insertions, 25 deletions
@@ -1,7 +1,7 @@ WeeChat ChangeLog ================= Sébastien Helleu <flashcode@flashtux.org> -v0.3.8-dev, 2012-05-01 +v0.3.8-dev, 2012-05-02 Version 0.3.8 (under dev!) @@ -29,6 +29,8 @@ Version 0.3.8 (under dev!) * scripts: fix type of argument "rc" in callback of hook_process (from string to integer) * guile: add missing function "hook_process_hashtable" in API +* irc: hide everything after "identify" or "register" in messages to nickserv + when option irc.look.hide_nickserv_pwd is on (bug #36362) * irc: add option "-pending" for command /disconnect (cancel auto-reconnection on servers currently reconnecting) (task #11985) * irc: set user modes only if target nick is self nick in message 221 diff --git a/src/plugins/irc/irc-display.c b/src/plugins/irc/irc-display.c index fede0722c..223a629b6 100644 --- a/src/plugins/irc/irc-display.c +++ b/src/plugins/irc/irc-display.c @@ -44,7 +44,7 @@ void irc_display_hide_password (char *string, int look_for_nickserv) { - char *pos_nickserv, *pos, *pos_pwd, *pos_space; + char *pos_nickserv, *pos, *pos_pwd; int char_size; pos = string; @@ -61,18 +61,7 @@ irc_display_hide_password (char *string, int look_for_nickserv) pos++; } if (strncmp (pos, "identify ", 9) == 0) - { pos_pwd = pos + 9; - pos_space = strchr (pos_pwd, ' '); - if (pos_space) - { - pos_pwd = pos_space + 1; - while (pos_pwd[0] == ' ') - { - pos_pwd++; - } - } - } else if (strncmp (pos, "register ", 9) == 0) pos_pwd = pos + 9; else @@ -82,18 +71,7 @@ irc_display_hide_password (char *string, int look_for_nickserv) { pos_pwd = strstr (pos, "identify "); if (pos_pwd) - { pos_pwd += 9; - pos_space = strchr (pos_pwd, ' '); - if (pos_space) - { - pos_pwd = pos_space + 1; - while (pos_pwd[0] == ' ') - { - pos_pwd++; - } - } - } else { pos_pwd = strstr (pos, "register "); @@ -111,7 +89,7 @@ irc_display_hide_password (char *string, int look_for_nickserv) pos_pwd++; } - while (pos_pwd && pos_pwd[0] && (pos_pwd[0] != ' ')) + while (pos_pwd && pos_pwd[0]) { char_size = weechat_utf8_char_size (pos_pwd); if (char_size > 0) |