diff options
| author | 2014-02-20 13:34:27 +0100 | |
|---|---|---|
| committer | 2014-02-20 13:34:27 +0100 | |
| commit | 5303501b930d3d6c765c24ff69edb722d8a6b5f1 (patch) | |
| tree | f19fab0754dfe58e548ed389fa0e669b4af4ee48 /src/modules/m_autoop.cpp | |
| parent | Create a name -> ModeHandler* map (diff) | |
Add a ModeParser::FindMode() overload that takes a mode name and a mode type
Diffstat (limited to 'src/modules/m_autoop.cpp')
| -rw-r--r-- | src/modules/m_autoop.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/modules/m_autoop.cpp b/src/modules/m_autoop.cpp index 889c3c801..828bef14c 100644 --- a/src/modules/m_autoop.cpp +++ b/src/modules/m_autoop.cpp @@ -37,14 +37,8 @@ class AutoOpList : public ListModeBase if (mid.length() == 1) return ServerInstance->Modes->FindPrefixMode(mid[0]); - const ModeParser::PrefixModeList& pmlist = ServerInstance->Modes->GetPrefixModes(); - for (ModeParser::PrefixModeList::const_iterator i = pmlist.begin(); i != pmlist.end(); ++i) - { - PrefixMode* mh = *i; - if (mh->name == mid) - return mh; - } - return NULL; + ModeHandler* mh = ServerInstance->Modes->FindMode(mid, MODETYPE_CHANNEL); + return mh ? mh->IsPrefixMode() : NULL; } ModResult AccessCheck(User* source, Channel* channel, std::string ¶meter, bool adding) |
