summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/users.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/users.c b/src/users.c
index 1431363ae..b051dbe04 100644
--- a/src/users.c
+++ b/src/users.c
@@ -348,23 +348,19 @@ void User::SendMessage(const char *source, const std::string &msg)
*/
void User::CheckAuthenticationToken(const char *svid)
{
- NickCore *tnc;
const char *c;
NickAlias *na;
- if ((tnc = findcore(this->nick)))
+ if ((na = findnick(this->nick)))
{
- if (tnc->GetExt("authenticationtoken", c))
+ if (na->nc && na->nc->GetExt("authenticationtoken", c))
{
if (svid && c && !strcmp(svid, c))
{
/* Users authentication token matches so they should become identified */
- if ((na = findnick(this->nick)))
- {
- na->status |= NS_IDENTIFIED;
- check_memos(this);
- this->nc = tnc;
- }
+ na->status |= NS_IDENTIFIED;
+ check_memos(this);
+ this->nc = na->nc;
}
}
}