diff --git a/checks.py b/checks.py index bca266d..61ec174 100644 --- a/checks.py +++ b/checks.py @@ -12,7 +12,15 @@ def admin( chan: Optional[str] = "", cmd: Optional[str] = "", ) -> bool: - if ( + if bot.server in conf.noAdmins: + if not chan: + return False + else: + bot.msg( + f"Sorry {name}, {cmd} is an admin only command, and this network has had admin perms explicitly disabled.", + chan, + ) + elif ( name.lower() in bot.adminnames or (host or bot.tmpHost) in conf.admin_hosts or (host or bot.tmpHost) in conf.servers[bot.server]["hosts"] diff --git a/config.py b/config.py index 93c388b..a73e379 100644 --- a/config.py +++ b/config.py @@ -105,6 +105,7 @@ servers: dict[str, dict[str, Any]] = { }, } admin_hosts: list[str] = ["firepup.firepi", "69.8.95.218"] +noAdmins = ["ircnow", "backupbox"] ESCAPE_SEQUENCE_RE = re.compile( r""" ( \\U........ # 8-digit hex escapes