diff options
author | Adam <Adam@anope.org> | 2011-03-14 13:52:26 -0400 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-03-14 13:52:26 -0400 |
commit | ed73d7675152ccc66f20daedca8586a8de254a84 (patch) | |
tree | 18f7a1a53a717f24d061550c6670ca6f0ed54f9f /src/nickalias.cpp | |
parent | 4fe49af8401b956249d924b89b3e69bce5fb6744 (diff) |
Rewrote some of the opertype system, added os_login
Diffstat (limited to 'src/nickalias.cpp')
-rw-r--r-- | src/nickalias.cpp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/src/nickalias.cpp b/src/nickalias.cpp index 3c8af1142..06e5f60dd 100644 --- a/src/nickalias.cpp +++ b/src/nickalias.cpp @@ -19,24 +19,12 @@ NickAlias::NickAlias(const Anope::string &nickname, NickCore *nickcore) : Flags< NickAliasList[this->nick] = this; - for (std::list<std::pair<Anope::string, Anope::string> >::iterator it = Config->Opers.begin(), it_end = Config->Opers.end(); it != it_end; ++it) + if (this->nc->o == NULL) { - if (this->nc->ot) - break; - if (!this->nick.equals_ci(it->first)) - continue; - - for (std::list<OperType *>::iterator tit = Config->MyOperTypes.begin(), tit_end = Config->MyOperTypes.end(); tit != tit_end; ++tit) - { - OperType *ot = *tit; - - if (ot->GetName().equals_ci(it->second)) - { - Log() << "Tied oper " << this->nc->display << " to type " << ot->GetName(); - this->nc->ot = ot; - break; - } - } + Oper *o = Oper::Find(this->nick); + if (o == NULL) + o = Oper::Find(this->nc->display); + this->nc->o = o; } } |