42 lines
889 B
Python
42 lines
889 B
Python
# coding=utf8
|
|
"""SpiceBotSERV
|
|
A Niche Wrapper around Sopel
|
|
"""
|
|
from __future__ import unicode_literals, absolute_import, division, print_function
|
|
|
|
import os
|
|
import pathlib
|
|
|
|
from sopel import plugin
|
|
|
|
from .SpiceBotCore import SpiceBotCore_OBJ
|
|
|
|
SCRIPT_DIR = pathlib.Path(os.path.dirname(os.path.abspath(__file__)))
|
|
|
|
sb = SpiceBotCore_OBJ(SCRIPT_DIR)
|
|
|
|
|
|
def setup(bot):
|
|
sb.setup(bot)
|
|
|
|
|
|
@plugin.nickname_command('test')
|
|
def sb_nickname_command(bot, trigger):
|
|
bot.say("Testing the bot")
|
|
bot.say("Attributes: %s" % [x for x in dir(sb) if not x.startswith("__")])
|
|
bot.say("%s" % sb.versions.dict)
|
|
|
|
sb.osd("test", trigger.sender)
|
|
|
|
|
|
@plugin.event("001")
|
|
@plugin.rule('.*')
|
|
def welcome_setup_start(bot, trigger):
|
|
sb.comms.ircbackend_initialize(bot)
|
|
|
|
|
|
@plugin.event(sb.events.BOT_CONNECTED)
|
|
@plugin.rule('.*')
|
|
def bot_events_start(bot, trigger):
|
|
sb.comms.hostmask_set(bot)
|