summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-16 13:32:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-16 13:32:08 +0000
commitafb3aed2aef8f62580300f2ecd1986dca595282e (patch)
tree93a032a3cede36a047ec242ddfd76d9ee6554d66 /src/modules
parent852d2a7b81fd2a8a0293c60f84a19a1e947db26e (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_dccallow.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp
index 6649b81db..2ee79e296 100644
--- a/src/modules/m_dccallow.cpp
+++ b/src/modules/m_dccallow.cpp
@@ -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;
}