diff --git a/sopel/coretasks.py b/sopel/coretasks.py index cd18d7afbe..e21f7aabc9 100644 --- a/sopel/coretasks.py +++ b/sopel/coretasks.py @@ -23,7 +23,7 @@ import sopel import sopel.module from sopel.bot import _CapReq -from sopel.tools import Identifier, iteritems +from sopel.tools import Identifier, iteritems, events from sopel.tools.target import User, Channel import base64 from sopel.logger import get_logger @@ -55,7 +55,7 @@ def auth_after_register(bot): )) -@sopel.module.event('001', '251') +@sopel.module.event(events.RPL_WELCOME, events.RPL_LUSERCLIENT) @sopel.module.rule('.*') @sopel.module.thread(False) @sopel.module.unblockable @@ -95,7 +95,7 @@ def startup(bot, trigger): bot.join(channel) -@sopel.module.event('477') +@sopel.module.event(events.ERR_NOCHANMODES) @sopel.module.rule('.*') @sopel.module.priority('high') def retry_join(bot, trigger): @@ -121,7 +121,7 @@ def retry_join(bot, trigger): @sopel.module.rule('(.*)') -@sopel.module.event('353') +@sopel.module.event(events.RPL_NAMREPLY) @sopel.module.priority('high') @sopel.module.thread(False) @sopel.module.unblockable @@ -494,7 +494,7 @@ def auth_proceed(bot, trigger): bot.write(('AUTHENTICATE', base64.b64encode(sasl_token.encode('utf-8')))) -@sopel.module.event('903') +@sopel.module.event(events.RPL_SASLSUCCESS) @sopel.module.rule('.*') def sasl_success(bot, trigger): bot.write(('CAP', 'END')) @@ -599,7 +599,7 @@ def account_notify(bot, trigger): bot.users[trigger.nick].account = account -@sopel.module.event('354') +@sopel.module.event(events.RPL_WHOSPCRPL) @sopel.module.rule('.*') @sopel.module.priority('high') @sopel.module.unblockable @@ -630,7 +630,7 @@ def _record_who(bot, channel, user, host, nick, account=None, away=None): bot.channels[channel].add_user(user) -@sopel.module.event('352') +@sopel.module.event(events.RPL_WHOREPLY) @sopel.module.rule('.*') @sopel.module.priority('high') @sopel.module.unblockable @@ -639,7 +639,7 @@ def recv_who(bot, trigger): _record_who(bot, channel, user, host, nick) -@sopel.module.event('315') +@sopel.module.event(events.RPL_ENDOFWHO) @sopel.module.rule('.*') @sopel.module.priority('high') @sopel.module.unblockable diff --git a/sopel/modules/find_updates.py b/sopel/modules/find_updates.py index 58511ef919..f369ab4885 100644 --- a/sopel/modules/find_updates.py +++ b/sopel/modules/find_updates.py @@ -15,6 +15,7 @@ import sopel import sopel.module import sopel.web +import sopel.tools wait_time = 24 * 60 * 60 # check once per day startup_check_run = False @@ -29,7 +30,7 @@ ) -@sopel.module.event('251') +@sopel.module.event(sopel.tools.events.LUSERCLIENT) @sopel.module.rule('.*') def startup_version_check(bot, trigger): global startup_check_run diff --git a/sopel/tools/_events.py b/sopel/tools/_events.py index 0a6cbf11e7..b805f06076 100644 --- a/sopel/tools/_events.py +++ b/sopel/tools/_events.py @@ -12,6 +12,7 @@ class events(object): # Only add things here if they're actually in common use across multiple # ircds. RPL_ISUPPORT = '005' + RPL_WHOSPCRPL = '354' # ################################################################### IRC v3 # ## 3.1