summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-07-27 18:13:56 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-07-27 18:13:56 -0400
commit502c985072240d1d3daa183d4d17c4692f597b5d (patch)
tree7437493ae594df6296a8e536d1467cb9a83ced9d /src/users.cpp
parent1144744c8599ddf9853fe056159d1e597e2ea003 (diff)
Fix bug in User::CheckAuthenticationToken since it should've been getting an Anope::string out of the extensible, not a char *. Oops.
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/users.cpp b/src/users.cpp
index b4d6ebfdf..ce370264f 100644
--- a/src/users.cpp
+++ b/src/users.cpp
@@ -145,9 +145,7 @@ void User::SetVIdent(const Anope::string &sident)
const Anope::string &User::GetVIdent() const
{
- if (this->HasMode(UMODE_CLOAK))
- return this->vident;
- else if (ircd->vident && !this->vident.empty())
+ if (this->HasMode(UMODE_CLOAK) || (ircd->vident && !this->vident.empty()))
return this->vident;
else
return this->ident;
@@ -339,10 +337,10 @@ void User::CheckAuthenticationToken(const Anope::string &svid)
if ((na = findnick(this->nick)))
{
- char *c;
- if (na->nc && na->nc->GetExtArray("authenticationtoken", c))
+ Anope::string c;
+ if (na->nc && na->nc->GetExtRegular("authenticationtoken", c))
{
- if (!svid.empty() && c && svid.equals_cs(c))
+ if (!svid.empty() && !c.empty() && svid.equals_cs(c))
/* Users authentication token matches so they should become identified */
this->Login(na->nc);
}