diff options
author | Adrien Saladin <adrien.saladin@gmail.com> | 2016-06-17 15:07:15 +0200 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-06-29 15:19:28 -0400 |
commit | 111ba3750fd16c81100de6b759103e527c2c22f7 (patch) | |
tree | 046871fab02f32d56e5657912ab6d6b527f5fd40 | |
parent | 16ba39d9fa2983be6b8223858ab3ff90930e3827 (diff) |
Mask nickserv ghost password
Closes #1750
-rw-r--r-- | src/common/outbound.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/outbound.c b/src/common/outbound.c index 539331a7..53ebe276 100644 --- a/src/common/outbound.c +++ b/src/common/outbound.c @@ -2805,9 +2805,14 @@ cmd_msg (struct session *sess, char *tbuf, char *word[], char *word_eol[]) else { /* mask out passwords */ - if (g_ascii_strcasecmp (nick, "nickserv") == 0 && - g_ascii_strncasecmp (msg, "identify ", 9) == 0) - msg = "identify ****"; + if (g_ascii_strcasecmp (nick, "nickserv") == 0) + { + if (g_ascii_strncasecmp (msg, "identify ", 9) == 0) + msg = "identify ****"; + else if (g_ascii_strncasecmp (msg, "ghost ", 6) == 0) + msg = "ghost ****"; + } + EMIT_SIGNAL (XP_TE_MSGSEND, sess, nick, msg, NULL, NULL, 0); } |