Handle negative / invalid arguments to kickrejoin correctly

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@872 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2007-11-12 21:53:02 +00:00
parent 65eb10a30e
commit d67c5973ad

View File

@@ -54,9 +54,14 @@ public:
else
delay = sDelay.ToUInt();
} else {
delay = sArgs.ToInt();
if (delay < 0)
delay = 0;
int i = sArgs.ToInt();
if ((i == 0 && sArgs == "0") || i > 0)
delay = i;
else {
sErrorMsg = "Illegal argument, "
"must be a positive number or 0";
return false;
}
}
return true;