예제 #1
0
    def __init__(self, msg=None):

        if msg:
            xmpp.Message.__init__(self, node=str(msg))
        else:
            xmpp.Message.__init__(self)

        EventBase.__init__(self)

        if msg:
            self.orig = msg

        self.jabber = True
        #self.id = self.getID()
        self.bot = None
        self.botoutput = False
        self.isresponse = False
        self.type = self.getType()
예제 #2
0
    def __init__(self, msg=None):

        if msg:
            xmpp.Message.__init__(self, node=str(msg))
        else:
            xmpp.Message.__init__(self)

        EventBase.__init__(self)

        if msg:
            self.orig = msg

        self.jabber = True
        #self.id = self.getID()
        self.bot = None
        self.botoutput = False
        self.isresponse = False
        self.type = self.getType()
예제 #3
0
    def cmnd(self, event, name, cmnd):
 
        """ do command on a bot by name. """

        name = name.lower()
        bot = self.byname(name)
        if not bot:
            return 0
        from gozerbot.eventbase import EventBase
        j = EventBase(event)
        j.txt = cmnd
        q = Queue.Queue()
        j.queues = [q]
        j.speed = 3
        start_new_thread(plugins.trydispatch, (bot, j))
        result = waitforqueue(q)
        if not result:
            return
        res = ["[%s]" % bot.name, ]
        res += result
        event.reply(res)
예제 #4
0
    def cmnd(self, event, name, cmnd):
        """ do command on a bot by name. """

        name = name.lower()
        bot = self.byname(name)
        if not bot:
            return 0
        from gozerbot.eventbase import EventBase
        j = EventBase(event)
        j.txt = cmnd
        q = Queue.Queue()
        j.queues = [q]
        j.speed = 3
        start_new_thread(plugins.trydispatch, (bot, j))
        result = waitforqueue(q)
        if not result:
            return
        res = [
            "[%s]" % bot.name,
        ]
        res += result
        event.reply(res)
예제 #5
0
 def __init__(self, ievent=None):
     EventBase.__init__(self, ievent)
예제 #6
0
 def __init__(self, ievent=None):
     EventBase.__init__(self, ievent)