Example #1
0
import threading

import acserver
from core.events import eventHandler, triggerServerEvent
from core.plugins import plugin
from core.consts import *

auth = plugin('Authentication')

from IRCBot.irclib import IRCBot, IRCConnection

acircbot = None
bot_running = False

settings = {}
    
class ACIRCBot(IRCBot):
    def command_patterns(self):
        return (
            ('/chanmsg', self.evt_chanmsg),
            ('/privmsg', self.evt_privmsg),
            ('/part', self.evt_part),
            ('/join', self.evt_join),
            ('/quit', self.evt_quit),
        )
    
    def evt_chanmsg(self,nick,msg,channel):
        triggerServerEvent("IRC_chanMsg",(self,nick,msg,channel))
    
    def evt_privmsg(self,nick,msg,channel):
        triggerServerEvent("IRC_privMsg",(self,nick,msg))