1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-30 23:06:38 +02:00

irc: hide everything after "identify" or "register" in messages to nickserv when option irc.look.hide_nickserv_pwd is on (bug #36362)

This commit is contained in:
Sebastien Helleu
2012-05-02 12:42:44 +02:00
parent c01aaf9335
commit 0b73835e8a
2 changed files with 5 additions and 25 deletions
+3 -1
View File
@@ -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
+2 -24
View File
@@ -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)