From ce664a160b1c1d4c75de5ba1867c96a0698326fd Mon Sep 17 00:00:00 2001 From: adam- Date: Tue, 4 Aug 2009 01:56:14 +0000 Subject: Fixed autoid git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2404 5417fbe8-f217-4b02-8779-1006273d7864 --- src/users.c | 34 ++++++++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 6 deletions(-) (limited to 'src/users.c') diff --git a/src/users.c b/src/users.c index 07f1bb20c..8f51da449 100644 --- a/src/users.c +++ b/src/users.c @@ -137,9 +137,6 @@ const std::string &User::GetUID() const } - - - void User::SetVIdent(const std::string &sident) { this->vident = sident; @@ -176,9 +173,6 @@ const std::string &User::GetIdent() const } - - - void User::SetRealname(const std::string &srealname) { if (srealname.empty()) @@ -326,6 +320,34 @@ void User::SendMessage(const char *source, const std::string &msg) } } +/** Check if the user should become identified because + * their svid matches the one stored in their nickcore + * @param svid Services id + */ +void User::CheckAuthenticationToken(const char *svid) +{ + NickCore *tnc; + const char *c; + NickAlias *na; + + if ((tnc = findcore(this->nick))) + { + if (tnc->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; + } + } + } + } +} + /*************************************************************************/ /*************************************************************************/ -- cgit