mirror of
https://github.com/anope/anope.git
synced 2026-06-27 08:46:38 +02:00
try/catch-ified all instances of convertTo to keep from aborting when a user gives too large or too small a number
This commit is contained in:
@@ -45,8 +45,12 @@ class CommandHSList : public Command
|
||||
source.Reply(LanguageString::LIST_INCORRECT_RANGE);
|
||||
return MOD_CONT;
|
||||
}
|
||||
from = convertTo<int>(key.substr(1, tmp - 1));
|
||||
to = convertTo<int>(key.substr(tmp + 1));
|
||||
try
|
||||
{
|
||||
from = convertTo<int>(key.substr(1, tmp - 1));
|
||||
to = convertTo<int>(key.substr(tmp + 1));
|
||||
}
|
||||
catch (const ConvertException &) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user