1
0
mirror of https://github.com/anope/anope.git synced 2026-07-04 13:13:14 +02:00

Moved opertype access checking to NickAlises constructor, cleans up some code and fixes bug #1163

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2968 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
Adam-
2010-05-19 06:17:55 +00:00
parent 2b4d834f8c
commit 3860856dd2
6 changed files with 21 additions and 75 deletions
+20
View File
@@ -52,6 +52,26 @@ NickAlias::NickAlias(const std::string &nickname, NickCore *nickcore)
this->nc = nickcore;
slist_add(&nc->aliases, this);
alpha_insert_alias(this);
for (std::list<std::pair<std::string, std::string> >::iterator it = Config.Opers.begin(); it != Config.Opers.end(); it++)
{
if (nc->ot)
break;
if (it->first != this->nick)
continue;
for (std::list<OperType *>::iterator tit = Config.MyOperTypes.begin(); tit != Config.MyOperTypes.end(); tit++)
{
OperType *ot = *tit;
if (ot->GetName() == it->second)
{
Alog() << "Tied oper " << nc->display << " to type " << ot->GetName();
nc->ot = ot;
break;
}
}
}
}
/** Default destructor