예제 #1
0
    def guide(self, irc, msg, args):
        """ requires no arguments

        Replies with a greeting.
        """
        x = irc.irc.nick
        xOwners = []
        for u in ircdb.users.itervalues():
            try:
                if u.checkCapability('owner'):
                    xOwners.append(u.name)
            except:
                pass
        if xOwners:
            utils.sortBy(str.lower, xOwners)
            y = 'The registered \'owners\' of this bot are %s. ' \
                'Please report any problems with \'%s\' to them. ' % (
                utils.commaAndify(xOwners), x) 
        else:
            y = ''
        irc.reply(self.helloMessage % (x, x, y, x),
            to=msg.nick, prefixNick=False, private=True)
예제 #2
0
파일: plugin.py 프로젝트: affix/Fedbot
    def list(self, irc, msg, args):
        """[<channel>]

        Lists the currently available observers.  If <channel> is given,
        returns the currently active observers on <channel>.
        """
        if args:
            # We don't use getChannel here because we don't want it to
            # automatically pick the channel if the message is sent in
            # the channel itself.
            channel = args.pop(0)
            if args or not ircutils.isChannel(channel):
                raise callbacks.ArgumentError
            observers = self.registryValue('observers.active', channel)
            # We don't sort because order matters.
        else:
            observers = self.registryValue('observers')
            utils.sortBy(str.lower, observers)
        if observers:
            irc.reply(utils.commaAndify(observers))
        else:
            irc.reply('There were no relevant observers.')
예제 #3
0
파일: plugin.py 프로젝트: Affix/Fedbot
    def list(self, irc, msg, args):
        """[<channel>]

        Lists the currently available observers.  If <channel> is given,
        returns the currently active observers on <channel>.
        """
        if args:
            # We don't use getChannel here because we don't want it to
            # automatically pick the channel if the message is sent in
            # the channel itself.
            channel = args.pop(0)
            if args or not ircutils.isChannel(channel):
                raise callbacks.ArgumentError
            observers = self.registryValue('observers.active', channel)
            # We don't sort because order matters.
        else:
            observers = self.registryValue('observers')
            utils.sortBy(str.lower, observers)
        if observers:
            irc.reply(utils.commaAndify(observers))
        else:
            irc.reply('There were no relevant observers.')