diff --git a/sopel/coretasks.py b/sopel/coretasks.py index af224959a7..9ef60ea6ea 100644 --- a/sopel/coretasks.py +++ b/sopel/coretasks.py @@ -186,6 +186,7 @@ def handle_names(bot, trigger): "@": sopel.module.OP, "&": sopel.module.ADMIN, "~": sopel.module.OWNER, + "!": sopel.module.OPER, } for name in names: @@ -248,6 +249,7 @@ def track_modes(bot, trigger): "o": sopel.module.OP, "a": sopel.module.ADMIN, "q": sopel.module.OWNER, + "y": sopel.module.OPER, } # Parse modes before doing anything else @@ -759,7 +761,7 @@ def recv_whox(bot, trigger): return LOGGER.warning('While populating `bot.accounts` a WHO response was malformed.') _, _, channel, user, host, nick, status, account = trigger.args away = 'G' in status - modes = ''.join([c for c in status if c in '~&@%+']) + modes = ''.join([c for c in status if c in '~&@%+!']) _record_who(bot, channel, user, host, nick, account, away, modes) @@ -789,6 +791,7 @@ def _record_who(bot, channel, user, host, nick, account=None, away=None, modes=N "@": sopel.module.OP, "&": sopel.module.ADMIN, "~": sopel.module.OWNER, + "!": sopel.module.OPER, } for c in modes: priv = priv | mapping[c] @@ -806,7 +809,7 @@ def _record_who(bot, channel, user, host, nick, account=None, away=None, modes=N @sopel.module.unblockable def recv_who(bot, trigger): channel, user, host, _, nick, status = trigger.args[1:7] - modes = ''.join([c for c in status if c in '~&@%+']) + modes = ''.join([c for c in status if c in '~&@%+!']) _record_who(bot, channel, user, host, nick, modes=modes) diff --git a/sopel/module.py b/sopel/module.py index aff8b60b89..18f030be85 100644 --- a/sopel/module.py +++ b/sopel/module.py @@ -75,6 +75,13 @@ .. versionadded:: 4.1 """ +OPER = 32 +"""Privilege level for the +y channel permission +Note: Sopel does not track OPER status except through the +y channel mode + +.. versionadded:: 7.0.0 +""" + def unblockable(function): """Decorator which exempts the function from nickname and hostname blocking.