- if (adding)
- {
- /* Setting a new limit, sanity check */
- long limit = atoi(parameter.c_str());
-
- /* Wrap low values at 32768 */
- if (limit < 0)
- limit = 0x7FFF;
-
- parameter = ConvToStr(limit);
-
- /* Set new limit */
- channel->SetModeParam('l', parameter);
-
- return MODEACTION_ALLOW;
- }
- else
- {
- /* Check if theres a limit here to remove.
- * If there isnt, dont allow the -l
- */
- if (channel->GetModeParameter('l').empty())
- {
- parameter = "";
- return MODEACTION_DENY;
- }
+ ext.set(chan, ConvToInt(parameter));
+ return MODEACTION_ALLOW;
+}