Adjust osd logic

This commit is contained in:
deathbybandaid 2019-05-11 16:46:34 -04:00
parent 120dfec954
commit 26022a2a2c
3 changed files with 16 additions and 5 deletions

View File

@ -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)

View File

@ -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'

View File

@ -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