Ejemplo n.º 1
0
def infocb(bot, ievent):
    """ implement a !infoitem callback """
    if not shouldignore(ievent.userhost):
        if 'handle_question' in bot.state['allowed'] or users.allowed(ievent.userhost, 'USER'):
             data = info.get(ievent.txt)
             if data:
                ievent.reply('%s is ' % ievent.txt, data , dot=True)
Ejemplo n.º 2
0
    def outputnolog(self, printto, what, how, who=None, fromm=None):
        """ do output but don't log it. """

        if fromm and shouldignore(fromm):
            return

        self.saynocb(printto, what)
Ejemplo n.º 3
0
    def outputnolog(self, printto, what, how, who=None, fromm=None):

        """ do output but don't log it. """

        if fromm and shouldignore(fromm):
            return

        self.saynocb(printto, what)
Ejemplo n.º 4
0
    def outputnolog(self, printto, what, how, who=None, fromm=None):
        """ do output to irc server .. rate limit to 3 sec. """

        if fromm and shouldignore(fromm):
            return

        try:
            what = fix_format(what)
            if what:
                if how == 'msg':
                    self.privmsg(printto, what)
                elif how == 'notice':
                    self.notice(printto, what)
                elif how == 'ctcp':
                    self.ctcp(printto, what)
        except Exception, ex:
            handle_exception()
Ejemplo n.º 5
0
    def outputnolog(self, printto, what, how, who=None, fromm=None):

        """ do output to irc server .. rate limit to 3 sec. """

        if fromm and shouldignore(fromm):
            return

        try:
            what = fix_format(what)
            if what:
                if how == 'msg':
                    self.privmsg(printto, what)
                elif how == 'notice':
                    self.notice(printto, what)
                elif how == 'ctcp':
                    self.ctcp(printto, what)
        except Exception, ex:
            handle_exception()
Ejemplo n.º 6
0
def prerelay(bot, ievent):
    """ precondition """
    if shouldignore(ievent.userhost):
        return 0
    return relay.wouldrelay(bot.name, ievent.channel)