Пример #1
0
    def say(self, printto, what, who=None, how='msg', fromm=None, speed=5):
        """ output what to printto. """

        # check if printto is a queue if so put output to the queue
        if type(printto) == type(Queue.Queue):
            printto.put_nowait('[%s] %s' % (self.name, what))
            return
        # check if bot is in notice mode
        notice = False
        try:
            notice = self.channels[printto]['notice']
        except (KeyError, TypeError):
            pass
        if notice:
            how = 'notice'
        Irc.say(self, printto, what, who, how, fromm, speed)
Пример #2
0
    def say(self, printto, what, who=None, how='msg', fromm=None, speed=5):

        """ output what to printto. """

        # check if printto is a queue if so put output to the queue
        if type(printto) == type(Queue.Queue): 
            printto.put_nowait('[%s] %s' % (self.name, what))
            return
        # check if bot is in notice mode
        notice = False
        try:
            notice = self.channels[printto]['notice']
        except (KeyError, TypeError):
            pass
        if notice:
            how = 'notice'
        Irc.say(self, printto, what, who, how, fromm, speed)