diff options
author | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-25 20:21:59 +0000 |
---|---|---|
committer | Adam- <Adam-@5417fbe8-f217-4b02-8779-1006273d7864> | 2010-05-25 20:21:59 +0000 |
commit | 1e2e80bf75ae7c7fd0737f64bc0248eada9e6fdc (patch) | |
tree | 26aad4e3bb4b5f2cb8544a7e28d9c567ecb60036 /src | |
parent | dc3744a71ca2db4a938ef0ae41ec551f708ceb02 (diff) |
Changed User::AutoID to always log in the user to the core, and to set usermode +r on users that should be. Fixes everyone being identified but not usermode +r on inspircd 1.2
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2985 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src')
-rw-r--r-- | src/users.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/users.c b/src/users.c index 26e50a40d..16d85796d 100644 --- a/src/users.c +++ b/src/users.c @@ -418,20 +418,22 @@ void User::CheckAuthenticationToken(const char *svid) /** Auto identify the user to the given accountname. * @param account Display nick of account */ -void User::AutoID(const char *account) +void User::AutoID(const std::string &account) { - NickCore *tnc; - NickAlias *na; + NickCore *core = findcore(account.c_str()); - if ((tnc = findcore(account))) + if (core) { - if ((na = findnick(this->nick)) && na->nc == tnc) + this->Login(core); + + NickAlias *na = findnick(this->nick); + if (na && na->nc == core) { if (na->last_realname) delete [] na->last_realname; na->last_realname = sstrdup(this->realname); na->last_seen = time(NULL); - this->Login(na->nc); + this->SetMode(findbot(Config.s_NickServ), UMODE_REGISTERED); this->UpdateHost(); check_memos(this); |