if (limit < 0)
limit = 0x7FFF;
- /* If the new limit is the same as the old limit,
- * and the old limit isnt 0, disallow */
- std::string oldlimit = channel->GetModeParameter('l');
- if (limit == atoi(oldlimit.c_str()) && oldlimit != "0")
- {
- parameter = "";
- return MODEACTION_DENY;
- }
-
parameter = ConvToStr(limit);
/* Set new limit */
- channel->SetModeParam('l', parameter.c_str(), true);
- channel->modes[CM_LIMIT] = 1;
+ channel->SetModeParam('l', parameter);
return MODEACTION_ALLOW;
}
}
/* Removing old limit, no checks here */
- channel->SetModeParam('l', "", false);
- channel->modes[CM_LIMIT] = 0;
-
+ channel->SetModeParam('l', "");
return MODEACTION_ALLOW;
}
}