if (adding)
{
+ if (tidy)
+ ModeParser::CleanMask(parameter);
+
+ if (parameter.length() > 250)
+ return MODEACTION_DENY;
+
// If there was no list
if (!el)
{
extItem.set(channel, el);
}
- // Clean the mask up
- if (this->tidy)
- ModeParser::CleanMask(parameter);
-
// Check if the item already exists in the list
for (modelist::iterator it = el->begin(); it != el->end(); it++)
{
{
// We have a pattern matching the channel...
maxsize = el->size();
- if (IS_LOCAL(source) || (maxsize < it->limit))
+ if (!IS_LOCAL(source) || (maxsize < it->limit))
{
/* Ok, it *could* be allowed, now give someone subclassing us
* a chance to validate the parameter.