diff options
-rw-r--r-- | src/modules/m_dccallow.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_dccallow.cpp b/src/modules/m_dccallow.cpp index f2d6bf105..eb364089a 100644 --- a/src/modules/m_dccallow.cpp +++ b/src/modules/m_dccallow.cpp @@ -213,9 +213,10 @@ class CommandDccallow : public Command { length = InspIRCd::Duration(default_length); } - else if (!atoi(parameters[1].c_str())) + else if (!InspIRCd::IsValidDuration(parameters[1])) { - length = 0; + user->WriteNumeric(ERR_DCCALLOWINVALID, user->nick, InspIRCd::Format("%s is not a valid DCCALLOW duration", parameters[1].c_str())); + return CMD_FAILURE; } else { |