mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 13:42:36 +01:00
Fix commit c0beda2422
.
This commit is contained in:
parent
08405c6ec5
commit
7d1c2705cf
@ -316,8 +316,7 @@ class Channel(callbacks.Plugin):
|
||||
bannedHostmask = irc.state.nickToHostmask(bannedNick)
|
||||
except KeyError:
|
||||
irc.error(format(_('I haven\'t seen %s.'), bannedNick), Raise=True)
|
||||
opcapability = ircdb.makeChannelCapability(channel, 'op')
|
||||
ownercapability = ircdb.makeCapability(channel, 'owner')
|
||||
capability = ircdb.makeChannelCapability(channel, 'op')
|
||||
banmaskstyle = conf.supybot.protocols.irc.banmask
|
||||
banmask = banmaskstyle.makeBanmask(bannedHostmask, [o[0] for o in optlist])
|
||||
# Check (again) that they're not trying to make us kickban ourself.
|
||||
@ -346,19 +345,19 @@ class Channel(callbacks.Plugin):
|
||||
schedule.addEvent(f, expiry)
|
||||
if bannedNick == msg.nick:
|
||||
doBan()
|
||||
elif ircdb.checkCapability(msg.prefix, opcapability):
|
||||
if ircdb.checkCapability(bannedHostmask, opcapability) and \
|
||||
not ircdb.checkCapability(msg.prefix, ownercapability):
|
||||
elif ircdb.checkCapability(msg.prefix, capability):
|
||||
if ircdb.checkCapability(bannedHostmask, capability) and \
|
||||
not ircdb.checkCapability(msg.prefix, 'owner'):
|
||||
self.log.warning('%s tried to ban %q, but both have %s',
|
||||
msg.prefix, bannedHostmask, opcapability)
|
||||
msg.prefix, bannedHostmask, capability)
|
||||
irc.error(format(_('%s has %s too, you can\'t ban '
|
||||
'him/her/it.'), bannedNick, opcapability))
|
||||
'him/her/it.'), bannedNick, capability))
|
||||
else:
|
||||
doBan()
|
||||
else:
|
||||
self.log.warning('%q attempted kban without %s',
|
||||
msg.prefix, opcapability)
|
||||
irc.errorNoCapability(opcapability)
|
||||
msg.prefix, capability)
|
||||
irc.errorNoCapability(capability)
|
||||
exact,nick,user,host
|
||||
kban = wrap(kban,
|
||||
['op',
|
||||
|
@ -1,3 +1,3 @@
|
||||
"""stick the various versioning attributes in here, so we only have to change
|
||||
them once."""
|
||||
version = '0.83.4.1+limnoria (2011-10-29T14:46:35+0200)'
|
||||
version = '0.83.4.1+limnoria (2011-10-29T15:23:39+0200)'
|
||||
|
Loading…
Reference in New Issue
Block a user