summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mode.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp
index 7aeaae1dc..637eb7ba5 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -644,6 +644,9 @@ bool ModeParser::AddMode(ModeHandler* mh)
if ((mh->GetPrefix() == ',') || (mh->GetPrefix() == ':') || (mh->GetPrefix() == '#'))
return false;
+ if (mh->GetPrefix() && FindPrefix(mh->GetPrefix()))
+ return false;
+
mh->GetModeType() == MODETYPE_USER ? mask = MASK_USER : mask = MASK_CHANNEL;
pos = (mh->GetModeChar()-65) | mask;