diff --git a/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py b/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py index 47a74e1..221c9eb 100644 --- a/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py +++ b/sopel_modules/SpiceBot_BotPrivs/BotPrivs.py @@ -18,8 +18,17 @@ def setup(bot): pass -@sopel.module.nickname_commands('admins', 'owners', 'owner') -def bot_command_hub(bot, trigger): +@sopel.module.nickname_commands('owners', 'owner') +def bot_command_owners(bot, trigger): + bot_command_process(bot, trigger) + + +@sopel.module.nickname_commands('admins') +def bot_command_admins(bot, trigger): + bot_command_process(bot, trigger) + + +def bot_command_process(bot, trigger): triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command') if triggercommand == 'owner': diff --git a/sopel_modules/SpiceBot_Messaging/Messaging.py b/sopel_modules/SpiceBot_Messaging/Messaging.py index 7c98550..ceb31bc 100644 --- a/sopel_modules/SpiceBot_Messaging/Messaging.py +++ b/sopel_modules/SpiceBot_Messaging/Messaging.py @@ -18,8 +18,22 @@ def setup(bot): pass -@sopel.module.nickname_commands('action', 'notice', 'privmsg') -def bot_command_hub(bot, trigger): +@sopel.module.nickname_commands('action') +def bot_command_action(bot, trigger): + bot_command_process(bot, trigger) + + +@sopel.module.nickname_commands('notice') +def bot_command_notice(bot, trigger): + bot_command_process(bot, trigger) + + +@sopel.module.nickname_commands('privmsg', 'say', 'msg') +def bot_command_privmsg(bot, trigger): + bot_command_process(bot, trigger) + + +def bot_command_process(bot, trigger): if not command_permissions_check(bot, trigger, ['admins', 'owner']): bot.say("I was unable to process this Bot Nick command due to privilege issues.") @@ -27,6 +41,9 @@ def bot_command_hub(bot, trigger): triggerargs, triggercommand = sopel_triggerargs(bot, trigger, 'nickname_command') + if triggercommand in ['say', 'msg']: + triggercommand = 'privmsg' + if not len(triggerargs): bot.say("You must specify a channel or nick.") return