- std::string::size_type colon = parameter.find(':');
- if ((colon == std::string::npos) || (parameter.find('-') != std::string::npos))
- {
- source->WriteNumeric(608, "%s :Invalid flood parameter", channel->name.c_str());
- return MODEACTION_DENY;
- }
-
- /* Set up the flood parameters for this channel */
- bool ban = (parameter[0] == '*');
- unsigned int nlines = ConvToInt(parameter.substr(ban ? 1 : 0, ban ? colon-1 : colon));
- unsigned int nsecs = ConvToInt(parameter.substr(colon+1));
-
- if ((nlines<2) || (nsecs<1))
- {
- source->WriteNumeric(608, "%s :Invalid flood parameter", channel->name.c_str());
- return MODEACTION_DENY;
- }
+ source->WriteNumeric(608, "%s :Invalid flood parameter", channel->name.c_str());
+ return MODEACTION_DENY;
+ }