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/opertype.cpp | |
parent | 4fe49af8401b956249d924b89b3e69bce5fb6744 (diff) |
Rewrote some of the opertype system, added os_login
Diffstat (limited to 'src/opertype.cpp')
-rw-r--r-- | src/opertype.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/opertype.cpp b/src/opertype.cpp index 19e0dd00f..9d6a4086f 100644 --- a/src/opertype.cpp +++ b/src/opertype.cpp @@ -7,6 +7,33 @@ #include "services.h" + +Oper *Oper::Find(const Anope::string &name) +{ + for (unsigned i = 0; i < Config->Opers.size(); ++i) + { + Oper *o = Config->Opers[i]; + + if (o->name.equals_ci(name)) + return o; + } + + return NULL; +} + +OperType *OperType::Find(const Anope::string &name) +{ + for (std::list<OperType *>::iterator it = Config->MyOperTypes.begin(), it_end = Config->MyOperTypes.end(); it != it_end; ++it) + { + OperType *ot = *it; + + if (ot->GetName() == name) + return ot; + } + + return NULL; +} + OperType::OperType(const Anope::string &nname) : name(nname) { } |