From afb3aed2aef8f62580300f2ecd1986dca595282e Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 16 Oct 2006 13:32:08 +0000 Subject: 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 --- src/modules/m_dccallow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules') 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; } -- cgit v1.2.3