mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-12 20:19:02 -04:00
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:
parent
852d2a7b81
commit
afb3aed2ae
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user