mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Make sure we don't take revenge on ourselves.
This commit is contained in:
parent
c63826dcff
commit
27cd893dbd
@ -162,8 +162,14 @@ class Enforcer(callbacks.Privmsg):
|
|||||||
return False # Default.
|
return False # Default.
|
||||||
|
|
||||||
def _revenge(self, irc, channel, hostmask):
|
def _revenge(self, irc, channel, hostmask):
|
||||||
irc.queueMsg(ircmsgs.ban(channel, ircutils.banmask(hostmask)))
|
nick = ircutils.nickFromHostmask(hostmask)
|
||||||
irc.queueMsg(ircmsgs.kick(channel,ircutils.nickFromHostmask(hostmask)))
|
if irc.nick != nick:
|
||||||
|
irc.queueMsg(ircmsgs.ban(channel, ircutils.banmask(hostmask)))
|
||||||
|
irc.queueMsg(ircmsgs.kick(channel, nick))
|
||||||
|
else:
|
||||||
|
# This can happen if takeRevengeOnOps is True.
|
||||||
|
self.log.info('Tried to take revenge on myself. '
|
||||||
|
'Are you sure you want takeRevengeOnOps to be True?')
|
||||||
|
|
||||||
def doKick(self, irc, msg):
|
def doKick(self, irc, msg):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user