summaryrefslogtreecommitdiff
path: root/src/modules/m_exemptchanops.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-09-02 12:33:28 +0200
committerattilamolnar <attilamolnar@hush.com>2013-09-12 14:44:17 +0200
commit7ba25076818e42b4eac9199477a01101cf57e848 (patch)
tree35c2c547fc992b58592a3b5f89d63cb53d589cbb /src/modules/m_exemptchanops.cpp
parent52e4d9c96c83ca4bbbeb487966ac2897a384907d (diff)
Keep lists of mode handlers by type
Diffstat (limited to 'src/modules/m_exemptchanops.cpp')
-rw-r--r--src/modules/m_exemptchanops.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp
index 5d8958665..a733fa475 100644
--- a/src/modules/m_exemptchanops.cpp
+++ b/src/modules/m_exemptchanops.cpp
@@ -65,10 +65,12 @@ class ExemptHandler : public HandlerBase3<ModResult, User*, Channel*, const std:
{
if (mid.length() == 1)
return ServerInstance->Modes->FindPrefixMode(mid[0]);
- for(char c='A'; c < 'z'; c++)
+
+ const ModeParser::PrefixModeList& pmlist = ServerInstance->Modes->GetPrefixModes();
+ for (ModeParser::PrefixModeList::const_iterator i = pmlist.begin(); i != pmlist.end(); ++i)
{
- PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(c);
- if (mh && mh->name == mid)
+ PrefixMode* mh = *i;
+ if (mh->name == mid)
return mh;
}
return NULL;