From d692aa43bb6ccc2f90db3b1a43f9dfc2f30485d5 Mon Sep 17 00:00:00 2001 From: Jason Nance Date: Tue, 8 Mar 2016 20:41:37 -0600 Subject: [PATCH] Reference instance as "bot" instead of "sopel" for clarity (this is the convention used in bundled modules) Fix reference to "admins" config section (which is in core) --- slap.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/slap.py b/slap.py index 11223a6..283c446 100644 --- a/slap.py +++ b/slap.py @@ -11,7 +11,7 @@ @commands('slap', 'slaps') -def slap(sopel, trigger): +def slap(bot, trigger): """.slap - Slaps """ text = trigger.group().split() if len(text) < 2: @@ -21,13 +21,13 @@ def slap(sopel, trigger): return if text[1] == 'me' or text[1] == 'myself': text[1] = trigger.nick - if text[1] == sopel.nick: - if (trigger.nick not in sopel.config.admins): + if text[1] == bot.nick: + if (trigger.nick not in bot.config.core.admins): text[1] = trigger.nick else: text[1] = 'itself' - if text[1] in sopel.config.admins: - if (trigger.nick not in sopel.config.admins): + if text[1] in bot.config.core.admins: + if (trigger.nick not in bot.config.core.admins): text[1] = trigger.nick verb = random.choice(('slaps', 'kicks', 'destroys', 'annihilates', 'punches', 'roundhouse kicks', 'pwns', 'owns')) - sopel.write(['PRIVMSG', trigger.sender, ' :\x01ACTION', verb, text[1], '\x01']) + bot.write(['PRIVMSG', trigger.sender, ' :\x01ACTION', verb, text[1], '\x01'])