summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-09-26 16:12:22 +0000
committerAdam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-09-26 16:12:22 +0000
commit5695a8b59524b58062e4874a135ee97e58cfe4ca (patch)
tree9dd9711ef61e8040df484e0e2ca20f26d04397ac /src
parent897f11e5176d7f42469dbd3c7e608607c7b51107 (diff)
Fixed bug #1108. nickserv status now replies correctly and has been changed to reply with a 3rd parameter which is for the account name the user is logged in as
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2519 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/core/ns_status.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/core/ns_status.c b/src/core/ns_status.c
index 5a2e56476..92913a30b 100644
--- a/src/core/ns_status.c
+++ b/src/core/ns_status.c
@@ -37,16 +37,21 @@ class CommandNSStatus : public Command
while (nick && i++ < 16)
{
+ na = findnick(nick);
+
if (!(u2 = finduser(nick))) /* Nick is not online */
- notice_lang(s_NickServ, u, NICK_STATUS_0, nick);
- else if (nick_identified(u2)) /* Nick is identified */
- notice_lang(s_NickServ, u, NICK_STATUS_3, nick);
+ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 0, "");
+ else if (nick_identified(u2) && na && na->nc == u2->nc) /* Nick is identified */
+ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 3, u2->nc->display);
else if (nick_recognized(u2)) /* Nick is recognised, but NOT identified */
- notice_lang(s_NickServ, u, NICK_STATUS_2, nick);
- else if (!(na = findnick(nick))) /* Nick is online, but NOT a registered */
- notice_lang(s_NickServ, u, NICK_STATUS_0, nick);
+ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 2, (u2->nc ? u2->nc->display : ""));
+ else if (!na) /* Nick is online, but NOT a registered */
+ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 0, "");
else
- notice_lang(s_NickServ, u, NICK_STATUS_1, nick);
+ /* Nick is not identified for the nick, but they could be logged into an account,
+ * so we tell the user about it
+ */
+ notice_lang(s_NickServ, u, NICK_STATUS_REPLY, nick, 1, (u2->nc ? u2->nc->display : ""));
/* Get the next nickname */
nick = params.size() > i ? params[i].c_str() : NULL;