diff options
Diffstat (limited to 'modules/chanserv/cs_enforce.cpp')
-rw-r--r-- | modules/chanserv/cs_enforce.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/modules/chanserv/cs_enforce.cpp b/modules/chanserv/cs_enforce.cpp index 825301cdd..3c0a464ef 100644 --- a/modules/chanserv/cs_enforce.cpp +++ b/modules/chanserv/cs_enforce.cpp @@ -166,14 +166,8 @@ private: return; } - int l; - try - { - l = convertTo<int>(l_str); - if (l < 0) - throw ConvertException(); - } - catch (const ConvertException &) + auto l = Anope::Convert<int>(l_str, -1); + if (l < 0) { source.Reply(_("The limit on %s is not valid."), ci->name.c_str()); return; |