aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_exemptchanops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_exemptchanops.cpp')
-rw-r--r--src/modules/m_exemptchanops.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp
index 6df211a55..47ee25a18 100644
--- a/src/modules/m_exemptchanops.cpp
+++ b/src/modules/m_exemptchanops.cpp
@@ -44,7 +44,12 @@ public:
static PrefixMode* FindMode(const std::string& pmode)
{
if (pmode.length() == 1)
- return ServerInstance->Modes.FindPrefixMode(pmode[0]);
+ {
+ PrefixMode* pm = ServerInstance->Modes.FindPrefixMode(pmode[0]);
+ if (!pm)
+ pm = ServerInstance->Modes.FindPrefix(pmode[0]);
+ return pm;
+ }
ModeHandler* mh = ServerInstance->Modes.FindMode(pmode, MODETYPE_CHANNEL);
return mh ? mh->IsPrefixMode() : nullptr;