diff options
| author | 2010-02-28 18:41:32 -0600 | |
|---|---|---|
| committer | 2010-08-03 17:32:38 -0400 | |
| commit | 33d1bbccbc3d400cbe7ab818606368f594122126 (patch) | |
| tree | 0a794871d48a29ed94a808731b03617c31433670 /src/mode.cpp | |
| parent | Fix snomask sending having the final-parameter colon stripped (noticed in glo... (diff) | |
Cap masks and bans at 250 characters
Diffstat (limited to 'src/mode.cpp')
| -rw-r--r-- | src/mode.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mode.cpp b/src/mode.cpp index b58161722..dce5759c5 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -352,6 +352,10 @@ ModeAction ModeParser::TryMode(User* user, User* targetuser, Channel* chan, irc: ModeHandler *mh = FindMode(modeid); int pcnt = mh->GetNumParams(adding); + // crop mode parameter size to 250 characters + if (mc.value.length() > 250) + mc.value = mc.value.substr(0, 250); + ModResult MOD_RESULT; FIRST_MOD_RESULT(OnRawMode, MOD_RESULT, (user, chan, mc)); |
