Fix checks on duration, this isnt valid, you cant compare a char* as an int:

else if (parameters[1] == 0)


git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5480 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
brain 2006-10-16 13:32:08 +00:00
parent 852d2a7b81
commit afb3aed2ae

View File

@ -149,11 +149,11 @@ class cmd_dccallow : public command_t
std::string default_length = Conf->ReadValue("dccallow", "length", 0).c_str();
long length;
if (pcnt == 1 || ServerInstance->Duration(parameters[1]) < 1)
if (pcnt == 1)
{
length = ServerInstance->Duration(default_length.c_str());
}
else if (parameters[1] == 0)
else if (!atoi(parameters[1]))
{
length = 0;
}