summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-12-05 21:13:16 +0100
committerattilamolnar <attilamolnar@hush.com>2012-12-05 21:49:47 +0100
commit391ec2c499523e98c681ccf5bf9f03a4fe551f57 (patch)
tree916af1d7ae1c53de2be3bb92ac6b404706406cc7 /src/modules
parenta969c1e440cb3f77e81ba5da3f4b3bf09bb5190a (diff)
m_svshold Fix crash when called with 2 params, only triggerable by u-lines
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_svshold.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/modules/m_svshold.cpp b/src/modules/m_svshold.cpp
index 9915ef7be..d2269839d 100644
--- a/src/modules/m_svshold.cpp
+++ b/src/modules/m_svshold.cpp
@@ -123,6 +123,9 @@ class CommandSvshold : public Command
}
else
{
+ if (parameters.size() < 3)
+ return CMD_FAILURE;
+
// Adding - XXX todo make this respect <insane> tag perhaps..
long duration = ServerInstance->Duration(parameters[1]);
SVSHold* r = new SVSHold(ServerInstance->Time(), duration, user->nick.c_str(), parameters[2].c_str(), parameters[0].c_str());