summaryrefslogtreecommitdiff
path: root/src/modules/m_svshold.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_svshold.cpp')
-rw-r--r--src/modules/m_svshold.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index 8eecd377d..52c250fef 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -127,7 +127,12 @@ class CommandSvshold : public Command
if (parameters.size() < 3)
return CMD_FAILURE;
- unsigned long duration = InspIRCd::Duration(parameters[1]);
+ unsigned long duration;
+ if (!InspIRCd::Duration(parameters[1], duration))
+ {
+ user->WriteNotice("*** Invalid duration for SVSHOLD");
+ return CMD_FAILURE;
+ }
SVSHold* r = new SVSHold(ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());
if (ServerInstance->XLines->AddLine(r, user))