mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Protector: unban user before inviting him. Closes GH-69.
This commit is contained in:
parent
a4653af792
commit
f943fee5d5
@ -143,8 +143,14 @@ class Protector(callbacks.Plugin):
|
|||||||
if self.isProtected(irc, channel, hostmask):
|
if self.isProtected(irc, channel, hostmask):
|
||||||
self.log.info('%s was kicked from %s and is protected; '
|
self.log.info('%s was kicked from %s and is protected; '
|
||||||
'inviting back.', hostmask, channel)
|
'inviting back.', hostmask, channel)
|
||||||
irc.queueMsg(ircmsgs.invite(nick, channel))
|
hostmask = '%s!%s' % (nick, irc.state.nickToHostmask(nick))
|
||||||
protected.append(nick)
|
protected.append(nick)
|
||||||
|
bans = []
|
||||||
|
for banmask in irc.state.channels[channel].bans:
|
||||||
|
if ircutils.hostmaskPatternEqual(banmask, hostmask):
|
||||||
|
bans.append(banmask)
|
||||||
|
irc.queueMsg(ircmsgs.unbans(channel, bans))
|
||||||
|
irc.queueMsg(ircmsgs.invite(nick, channel))
|
||||||
if not self.isOp(irc, channel, msg.prefix):
|
if not self.isOp(irc, channel, msg.prefix):
|
||||||
self.demote(irc, channel, msg.nick)
|
self.demote(irc, channel, msg.nick)
|
||||||
|
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
"""stick the various versioning attributes in here, so we only have to change
|
"""stick the various versioning attributes in here, so we only have to change
|
||||||
them once."""
|
them once."""
|
||||||
version = '0.83.4.1+limnoria (2011-07-09T13:43:24+0200)'
|
version = '0.83.4.1+limnoria (2011-07-09T13:44:16+0200)'
|
||||||
|
Loading…
Reference in New Issue
Block a user