unsigned int Backlog;
unsigned int Lines;
unsigned int Diff;
- unsigned int Seconds;
+ unsigned long Seconds;
void serialize(std::string& out) const
{
{
}
- void OnUnset(User* source, Channel* chan)
+ void OnUnset(User* source, Channel* chan) CXX11_OVERRIDE
{
// Unset the per-membership extension when the mode is removed
const Channel::MemberMap& users = chan->GetUsers();
else
settings.Action = ChannelSettings::ACT_KICK;
- if ((settings.Lines = ConvToInt(item)) == 0)
+ if ((settings.Lines = ConvToNum<unsigned int>(item)) == 0)
return false;
- if ((!stream.GetToken(item)) || ((settings.Seconds = InspIRCd::Duration(item)) == 0))
+ if (!InspIRCd::Duration(item, settings.Seconds))
+ return false;
+
+ if ((!stream.GetToken(item)) || (settings.Seconds == 0))
// Required parameter missing
return false;
if (stream.GetToken(item))
{
// There is a diff parameter, see if it's valid (> 0)
- if ((settings.Diff = ConvToInt(item)) == 0)
+ if ((settings.Diff = ConvToNum<unsigned int>(item)) == 0)
return false;
if (stream.GetToken(item))
{
// There is a backlog parameter, see if it's valid
- if ((settings.Backlog = ConvToInt(item)) == 0)
+ if ((settings.Backlog = ConvToNum<unsigned int>(item)) == 0)
return false;
// If there are still tokens, then it's invalid because we allow only 4