summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoradam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-08-06 22:04:47 +0000
committeradam- <adam-@5417fbe8-f217-4b02-8779-1006273d7864>2009-08-06 22:04:47 +0000
commit8df2076024739c7077bd5034dfea34309b8586b0 (patch)
treeef0ebd0f5e5fe52cf4c6431313fa33c9deffac6a /src
parentec398f6a5522477326e6b2615be0b917a46744fc (diff)
Clean up some of inspircds autoid code and make it not resend account name on nick change
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2435 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r--src/protocol/inspircd12.cpp30
-rw-r--r--src/users.c2
2 files changed, 18 insertions, 14 deletions
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index 24c572aa4..320141fa1 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -707,19 +707,7 @@ class InspIRCdProto : public IRCDProto
void SendAccountLogin(User *u, NickCore *account)
{
- char *c;
-
send_cmd(TS6SID, "METADATA %s accountname :%s", u->GetUID().c_str(), account->display);
-
- if (account->GetExt("authenticationtoken", c))
- {
- delete [] c;
- account->Shrink("authenticationtoken");
- }
-
- account->Extend("authenticationtoken", sstrdup(account->display));
-
- common_svsmode(u, "+r", "");
}
void SendAccountLogout(User *u, NickCore *account)
@@ -735,6 +723,24 @@ class InspIRCdProto : public IRCDProto
return 1;
}
+ void SetAutoIdentificationToken(User *u)
+ {
+ char *c;
+
+ if (!u->nc)
+ return;
+
+ if (u->nc->GetExt("authenticationtoken", c))
+ {
+ delete [] c;
+ u->nc->Shrink("authenticationtoken");
+ }
+
+ u->nc->Extend("authenticationtoken", sstrdup(u->nc->display));
+
+ common_svsmode(u, "+r", NULL);
+ }
+
} ircd_proto;
diff --git a/src/users.c b/src/users.c
index a1a932e41..18baef319 100644
--- a/src/users.c
+++ b/src/users.c
@@ -771,7 +771,6 @@ User *do_nick(const char *source, const char *nick, const char *username, const
ntmp->last_usermask = new char[user->GetIdent().length() + user->GetDisplayedHost().length() + 2];
sprintf(ntmp->last_usermask, "%s@%s",
user->GetIdent().c_str(), user->GetDisplayedHost().c_str());
- ircdproto->SendAccountLogin(user, user->nc);
ircdproto->SetAutoIdentificationToken(user);
alog("%s: %s!%s@%s automatically identified for nick %s", s_NickServ, user->nick, user->GetIdent().c_str(), user->host, user->nick);
}
@@ -781,7 +780,6 @@ User *do_nick(const char *source, const char *nick, const char *username, const
{
if (nick_identified(user))
{
- ircdproto->SendAccountLogin(user, user->nc);
ircdproto->SetAutoIdentificationToken(user);
}
}