- std::string::size_type colon = parameter.find(':');
- if ((colon == std::string::npos) || (parameter.find('-') != std::string::npos))
- {
- source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name.c_str());
- return MODEACTION_DENY;
- }
-
- /* Set up the flood parameters for this channel */
- unsigned int njoins = ConvToInt(parameter.substr(0, colon));
- unsigned int nsecs = ConvToInt(parameter.substr(colon+1));
- if ((njoins<1) || (nsecs<1))
- {
- source->WriteNumeric(608, "%s %s :Invalid flood parameter",source->nick.c_str(),channel->name.c_str());
- return MODEACTION_DENY;
- }
-
- joinfloodsettings jfs(nsecs, njoins);
- joinfloodsettings* f = ext.get(channel);
- if ((f) && (*f == jfs))
- // mode params match
- return MODEACTION_DENY;
-
- ext.set(channel, jfs);
- parameter = ConvToStr(njoins) + ":" + ConvToStr(nsecs);
- channel->SetModeParam(this, parameter);
- return MODEACTION_ALLOW;
+ source->WriteNumeric(608, channel->name, "Invalid flood parameter");
+ return MODEACTION_DENY;