diff --git a/sopel_modules/SpiceBot_AI/AI_Ping.py b/sopel_modules/SpiceBot_AI/AI_Ping.py new file mode 100644 index 0000000..4931797 --- /dev/null +++ b/sopel_modules/SpiceBot_AI/AI_Ping.py @@ -0,0 +1,15 @@ +# coding=utf-8 + +from __future__ import unicode_literals, absolute_import, division, print_function + +import sopel.module + + +@sopel.module.rule(r'(?i)(ping),? $nickname[ \t]*$') +def bot_command_ping(bot, trigger): + bot.say("Pong") + + +@sopel.module.nickname_commands('ping') +def bot_command_ping_b(bot, trigger): + bot_command_ping(bot, trigger) diff --git a/sopel_modules/SpiceBot_AI/__init__.py b/sopel_modules/SpiceBot_AI/__init__.py index ba6da7a..18cca3e 100644 --- a/sopel_modules/SpiceBot_AI/__init__.py +++ b/sopel_modules/SpiceBot_AI/__init__.py @@ -8,6 +8,7 @@ from .AI_Thanks import * from .AI_Acknowledge import * from .AI_Lazy import * from .AI_InsultHandler import * +from .AI_Ping import * __author__ = 'Sam Zick' __email__ = 'sam@deathbybandaid.net' diff --git a/sopel_modules/SpiceBot_osd/__init__.py b/sopel_modules/SpiceBot_osd/__init__.py index ce6dd3c..d4929a4 100644 --- a/sopel_modules/SpiceBot_osd/__init__.py +++ b/sopel_modules/SpiceBot_osd/__init__.py @@ -54,7 +54,6 @@ def setup(bot): sopel.bot.SopelWrapper.action = SopelWrapperOSD.action sopel.bot.SopelWrapper.notice = SopelWrapperOSD.notice sopel.bot.SopelWrapper.reply = SopelWrapperOSD.reply - sopel.bot.SopelWrapper.msg = SopelWrapperOSD.msg # verify config settings for server bot_logging(bot, 'SpiceBot_OSD', "Checking for config settings") @@ -394,10 +393,6 @@ class SopelWrapperOSD(object): recipients = self._trigger.sender self._bot.osd(self, messages, recipients, text_method, max_messages) - def msg(self, destination, message, max_messages=1): - self._bot.osd(self, message, destination, 'PRIVMSG', 1) - # self._bot.msg(destination, message, max_messages) - def say(self, message, destination=None, max_messages=1): if destination is None: destination = self._trigger.sender