Channel: Implement @listbans.

This commit is contained in:
Valentin Lorentz 2012-12-23 17:19:29 +01:00
parent 6a06ca9911
commit c46602d3f2

View File

@ -434,6 +434,15 @@ class Channel(callbacks.Plugin):
('isGranted', _('unban someone')),
additional('hostmask')])
@internationalizeDocstring
def listbans(self, irc, msg, args, channel):
"""[<channel>]
List all bans on the channel.
If <channel> is not given, it defaults to the current channel."""
irc.replies(irc.state.channels[channel].bans or [_('No bans.')])
listbans = wrap(listbans, ['channel'])
@internationalizeDocstring
def invite(self, irc, msg, args, channel, nick):
"""[<channel>] <nick>