diff options
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/biboumi_adhoc_commands.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/xmpp/biboumi_adhoc_commands.cpp b/src/xmpp/biboumi_adhoc_commands.cpp index 45557aa..7c31f36 100644 --- a/src/xmpp/biboumi_adhoc_commands.cpp +++ b/src/xmpp/biboumi_adhoc_commands.cpp @@ -494,7 +494,11 @@ void ConfigureIrcServerStep2(XmppComponent& xmpp_component, AdhocSession& sessio else if (field->get_tag("var") == "throttle_limit" && value) { - options.col<Database::ThrottleLimit>() = std::stoul(value->get_inner()); + try { + options.col<Database::ThrottleLimit>() = std::stol(value->get_inner()); + } catch (const std::logic_error&) { + options.col<Database::ThrottleLimit>() = -1; + } Bridge* bridge = biboumi_component.find_user_bridge(session.get_owner_jid()); if (bridge) { |