1
0
mirror of https://github.com/anope/anope.git synced 2026-07-03 03:43:12 +02:00

Fix bug in User::CheckAuthenticationToken since it should've been getting an Anope::string out of the extensible, not a char *. Oops.

This commit is contained in:
Naram Qashat
2010-07-27 18:13:56 -04:00
parent 1144744c85
commit 502c985072
+4 -6
View File
@@ -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);
}