From e15a5618b0c42ed4f556fa50d6442a7a8e408b29 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 27 Apr 2006 00:29:14 +0000 Subject: [PATCH] plugins/Channel: Add the expiry information to Channel.ban list. --- plugins/Channel/plugin.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index 82083cfe9..d00602ae0 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -517,12 +517,19 @@ class Channel(callbacks.Plugin): """[] 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))