Use Config::is_in_list() to allow for multiple admins

This commit is contained in:
Emmanuel Gil Peyrot
2018-04-16 00:53:25 +02:00
committed by louiz’
parent a429b2ea27
commit 0d487f40c5
3 changed files with 5 additions and 8 deletions
+1 -1
View File
@@ -658,7 +658,7 @@ bool handle_irc_channel_configuration_form(XmppComponent& xmpp_component, const
void DisconnectUserFromServerStep1(XmppComponent& xmpp_component, AdhocSession& session, XmlNode& command_node)
{
const Jid owner(session.get_owner_jid());
if (owner.bare() != Config::get("admin", ""))
if (!Config::is_in_list("admin", owner.bare()))
{ // A non-admin is not allowed to disconnect other users, only
// him/herself, so we just skip this step
auto next_step = session.get_next_step();