Disable the throttle limit if negative
Also, invalid values result in -1 being set
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user