plugins/Channel: Add the expiry information to Channel.ban list.

This commit is contained in:
James Vega 2006-04-27 00:29:14 +00:00
parent 7c88da9a29
commit e15a5618b0
1 changed files with 10 additions and 3 deletions

View File

@ -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))