mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 06:04:21 +01:00
plugins/Channel: Add the expiry information to Channel.ban list.
This commit is contained in:
parent
7c88da9a29
commit
e15a5618b0
@ -517,12 +517,19 @@ class Channel(callbacks.Plugin):
|
||||
"""[<channel>]
|
||||
|
||||
If you have the #channel,op capability, this will show you the
|
||||
current bans on #channel.
|
||||
current persistent bans on #channel.
|
||||
"""
|
||||
# XXX Add the expirations.
|
||||
c = ircdb.channels.getChannel(channel)
|
||||
if c.bans:
|
||||
irc.reply(format('%L', map(utils.str.dqrepr, c.bans)))
|
||||
bans = []
|
||||
for ban in c.bans:
|
||||
if c.bans[ban]:
|
||||
bans.append(format('%q (expires %t)',
|
||||
ban, c.bans[ban]))
|
||||
else:
|
||||
bans.append(format('%q (never expires)',
|
||||
ban, c.bans[ban]))
|
||||
irc.reply(format('%L', bans))
|
||||
else:
|
||||
irc.reply(format('There are no persistent bans on %s.',
|
||||
channel))
|
||||
|
Loading…
Reference in New Issue
Block a user