From 391ec2c499523e98c681ccf5bf9f03a4fe551f57 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Wed, 5 Dec 2012 21:13:16 +0100 Subject: m_svshold Fix crash when called with 2 params, only triggerable by u-lines --- src/modules/m_svshold.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 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()); -- cgit v1.2.3