From c5d24dd9bd4ce165e5ebdbcd8a58a63d9d4ac999 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 6 Feb 2010 16:35:07 +0000 Subject: [PATCH] Fail adding of new mode when its prefix is already in use git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12386 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.39.5