From: brain Date: Fri, 13 Jul 2007 17:26:45 +0000 (+0000) Subject: Explicitly disallow mode prefixes > 126, to prevent excess muppetry by 3rd party... X-Git-Tag: v2.0.23~4987 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=d7ac76bed17ac6c9f0884f5e37d01f075243a3b8;p=user%2Fhenk%2Fcode%2Finspircd.git Explicitly disallow mode prefixes > 126, to prevent excess muppetry by 3rd party module devs git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7438 e03df62e-2008-0410-955e-edbf42e46eb7 --- diff --git a/src/mode.cpp b/src/mode.cpp index 4573cca07..db120cfe5 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -691,7 +691,7 @@ bool ModeParser::AddMode(ModeHandler* mh, unsigned const char modeletter) * If they do that, thats their problem, and if i ever EVER see an * official InspIRCd developer do that, i'll beat them with a paddle! */ - if ((mh->GetModeChar() < 'A') || (mh->GetModeChar() > 'z')) + if ((mh->GetModeChar() < 'A') || (mh->GetModeChar() > 'z') || (mh->GetPrefix() > 126)) return false; /* A mode prefix of ',' is not acceptable, it would fuck up server to server.