From 7906b8273dedc41659495df3cc4e0b3dd5d516c9 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 1 Mar 2010 00:42:04 +0000 Subject: Cap masks and bans at 250 characters git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12575 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/mode.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mode.cpp') diff --git a/src/mode.cpp b/src/mode.cpp index a632ab516..bda0f81aa 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -265,6 +265,10 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, bool ModeHandler *mh = FindMode(modechar, type); int pcnt = mh->GetNumParams(adding); + // crop mode parameter size to 250 characters + if (parameter.length() > 250) + parameter = parameter.substr(0, 250); + ModResult MOD_RESULT; FIRST_MOD_RESULT(OnRawMode, MOD_RESULT, (user, chan, modechar, parameter, adding, pcnt)); -- cgit v1.2.3