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