mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
Adjust osd logic
This commit is contained in:
parent
120dfec954
commit
26022a2a2c
15
sopel_modules/SpiceBot_AI/AI_Ping.py
Normal file
15
sopel_modules/SpiceBot_AI/AI_Ping.py
Normal 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)
|
||||
@ -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'
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user