def deopall(self, irc, msg, args, include_self, channel):
        """[--include-self] [<channel>]

        Deops everyone in the channel. Unless --include-self is given,
        the bot won't deop itself. <channel> is only necessary
        if the message isn't sent in the channel itself.
        """

        chanstate = irc.state.channels[channel]
        users = [user for user in chanstate.users if chanstate.isOp(user)]

        if irc.nick in users and not include_self:
            users.remove(irc.nick)

        for batch in self._split_modes(users):
            irc.queueMsg(ircmsgs.deops(channel, batch))
Exemple #2
0
 def f(L):
     return ircmsgs.deops(channel, L)
Exemple #3
0
 def f(L):
     return ircmsgs.deops(channel, L)
Exemple #4
0
 def testDeops(self):
     m = ircmsgs.deops('#foo', ['foo', 'bar', 'baz'])
     self.assertEqual(str(m), 'MODE #foo -ooo foo bar :baz\r\n')
Exemple #5
0
 def testDeops(self):
     m = ircmsgs.deops('#foo', ['foo', 'bar', 'baz'])
     self.assertEqual(str(m), 'MODE #foo -ooo foo bar :baz\r\n')