mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
takeRevengeOnOps.
This commit is contained in:
parent
4697f61be2
commit
8979bc8c3d
@ -1,3 +1,9 @@
|
||||
* Added supybot.plugins.Enforcer.takeRevengeOnOps, which makes
|
||||
the bot even take revenge on #channel,ops who try to violate the
|
||||
channel configuration. Of course, such people can change the
|
||||
channel configuration to their bidding, but it's a decent
|
||||
protection against errant botscripts or something.
|
||||
|
||||
* Added supybot.plugins.Channels.alwaysRejoin, to make the bot
|
||||
always rejoin when it's kicked.
|
||||
|
||||
|
@ -82,6 +82,10 @@ conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'takeRevenge',
|
||||
registry.Boolean(False, """Determines whether the bot will take revenge on
|
||||
people who do things it doesn't like (somewhat like 'bitch mode' in other
|
||||
IRC bots)."""))
|
||||
conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'takeRevengeOnOps',
|
||||
registry.Boolean(False, """Determines whether the bot will even take
|
||||
revenge on ops (people with the #channel,op capability) who violate the
|
||||
channel configuration."""))
|
||||
conf.registerChannelValue(conf.supybot.plugins.Enforcer, 'cycleToGetOps',
|
||||
registry.Boolean(True, """Determines whether the bot will cycle the channel
|
||||
if it doesn't have ops and there's no one else in the channel."""))
|
||||
@ -165,7 +169,8 @@ class Enforcer(callbacks.Privmsg):
|
||||
channel = msg.args[0]
|
||||
kicked = msg.args[1].split(',')
|
||||
deop = False
|
||||
if not self._isPowerful(irc, msg):
|
||||
if not self._isPowerful(irc, msg) or \
|
||||
self.registryValue('takeRevengeOnOps', channel):
|
||||
for nick in kicked:
|
||||
hostmask = irc.state.nickToHostmask(nick)
|
||||
if nick == irc.nick:
|
||||
@ -185,7 +190,9 @@ class Enforcer(callbacks.Privmsg):
|
||||
def doMode(self, irc, msg):
|
||||
channel = msg.args[0]
|
||||
chanserv = self.registryValue('ChanServ', channel)
|
||||
if not ircutils.isChannel(channel) or self._isPowerful(irc, msg):
|
||||
if not ircutils.isChannel(channel) or \
|
||||
(self._isPowerful(irc, msg) and \
|
||||
not self.registryValue('takeRevengeOnOps', channel):
|
||||
return
|
||||
for (mode, value) in ircutils.separateModes(msg.args[1:]):
|
||||
if value == msg.nick:
|
||||
|
Loading…
Reference in New Issue
Block a user