def ooc_cmd_unban(client, arg): """ Unban a list of users. Usage: /unban <ban_id...> """ if len(arg) == 0: raise ArgumentError( 'You must specify a target. Use /unban <ban_id...>') args = list(arg.split(' ')) client.send_ooc(f'Attempting to lift {len(args)} ban(s)...') for ban_id in args: if database.unban(ban_id): client.send_ooc(f'Removed ban ID {ban_id}.') else: client.send_ooc(f'{ban_id} is not on the ban list.') database.log_misc('unban', client, data={'id': ban_id})
def ooc_cmd_unban(client, arg): """ Unban a list of users. Usage: /unban <ban_id...> """ if len(arg) == 0: raise ArgumentError( "You must specify a target. Use /unban <ban_id...>") args = list(arg.split(" ")) client.send_ooc(f"Attempting to lift {len(args)} ban(s)...") for ban_id in args: if database.unban(ban_id): client.send_ooc(f"Removed ban ID {ban_id}.") client.server.webhooks.unban(ban_id, client) else: client.send_ooc(f"{ban_id} is not on the ban list.") database.log_misc("unban", client, data={"id": ban_id})