mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user