1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 21:26:37 +02:00

Changed /nickserv id to allow you to switch accounts without logging out first and /nickserv logout to log you out of your account and not check the nick

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2452 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
adam-
2009-08-15 01:15:21 +00:00
parent ece55718e7
commit 89e05fb880
2 changed files with 14 additions and 10 deletions
+10 -1
View File
@@ -44,7 +44,11 @@ class CommandNSIdentify : public Command
notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
else if (na->nc->flags & NI_SUSPENDED)
notice_lang(s_NickServ, u, NICK_X_SUSPENDED, na->nick);
else if (nick_identified(u))
/* You can now identify for other nicks without logging out first,
* however you can not identify again for the group you're already
* identified as
*/
else if (u->nc && u->nc == na->nc)
notice_lang(s_NickServ, u, NICK_ALREADY_IDENTIFIED);
else if (!(res = enc_check_password(pass, na->nc->pass)))
{
@@ -56,6 +60,11 @@ class CommandNSIdentify : public Command
notice_lang(s_NickServ, u, NICK_IDENTIFY_FAILED);
else
{
if (nick_identified(u))
{
alog("%s: %s!%s@%s logged out of account %s", s_NickServ, u->nick, u->GetIdent().c_str(), u->host, u->nc->display);
}
if (!(na->status & NS_IDENTIFIED) && !(na->status & NS_RECOGNIZED))
{
if (na->last_usermask)
+4 -9
View File
@@ -37,23 +37,18 @@ class CommandNSLogout : public Command
this->OnSyntaxError(u);
else if (!(u2 = (nick ? finduser(nick) : u)))
notice_lang(s_NickServ, u, NICK_X_NOT_IN_USE, nick);
else if (!(na = findnick(u2->nick)))
{
if (nick)
notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
else
notice_lang(s_NickServ, u, NICK_NOT_REGISTERED);
}
else if (nick && u2->nc && !u2->nc->IsServicesOper())
notice_lang(s_NickServ, u, NICK_LOGOUT_SERVICESADMIN, nick);
else
{
na = findnick(u2->nick);
if (nick && !param.empty() && param == "REVALIDATE")
{
cancel_user(u2);
validate_user(u2);
}
else
else if (na)
{
na->status &= ~(NS_IDENTIFIED | NS_RECOGNIZED);
}
@@ -80,7 +75,7 @@ class CommandNSLogout : public Command
notice_lang(s_NickServ, u, NICK_LOGOUT_SUCCEEDED);
/* Clear any timers again */
if (u->nc->flags & NI_KILLPROTECT)
if (na && u->nc->flags & NI_KILLPROTECT)
del_ns_timeout(na, TO_COLLIDE);
ircdproto->SendAccountLogout(u2, u2->nc);