Rename ban/unban back to permban/unpermban and add the mode -b part to

unpermban.  I'll leave the addition of mode +b in permban to jemfinch since
he'll probably factor out a bit of common code in permban and the new ban
command.
This commit is contained in:
James Vega 2004-08-26 14:28:37 +00:00
parent b59eba8c58
commit 36d9b07b41

View File

@ -432,7 +432,7 @@ class Channel(callbacks.Privmsg):
irc.replySuccess() irc.replySuccess()
unlobotomize = privmsgs.checkChannelCapability(unlobotomize, 'op') unlobotomize = privmsgs.checkChannelCapability(unlobotomize, 'op')
def ban(self, irc, msg, args, channel): def permban(self, irc, msg, args, channel):
"""[<channel>] <nick|hostmask> """[<channel>] <nick|hostmask>
If you have the #channel,op capability, this will effect a permanent If you have the #channel,op capability, this will effect a permanent
@ -452,9 +452,9 @@ class Channel(callbacks.Privmsg):
c.addBan(banmask) c.addBan(banmask)
ircdb.channels.setChannel(channel, c) ircdb.channels.setChannel(channel, c)
irc.replySuccess() irc.replySuccess()
ban = privmsgs.checkChannelCapability(ban, 'op') permban = privmsgs.checkChannelCapability(permban, 'op')
def unban(self, irc, msg, args, channel): def unpermban(self, irc, msg, args, channel):
"""[<channel>] <hostmask> """[<channel>] <hostmask>
If you have the #channel,op capability, this will remove the permanent If you have the #channel,op capability, this will remove the permanent
@ -465,10 +465,11 @@ class Channel(callbacks.Privmsg):
c = ircdb.channels.getChannel(channel) c = ircdb.channels.getChannel(channel)
c.removeBan(banmask) c.removeBan(banmask)
ircdb.channels.setChannel(channel, c) ircdb.channels.setChannel(channel, c)
irc.queueMsg(ircmsgs.unban(channel, banmask))
irc.replySuccess() irc.replySuccess()
unban = privmsgs.checkChannelCapability(unban, 'op') unpermban = privmsgs.checkChannelCapability(unpermban, 'op')
def bans(self, irc, msg, args, channel): def permbans(self, irc, msg, args, channel):
"""[<channel>] """[<channel>]
If you have the #channel,op capability, this will show you the If you have the #channel,op capability, this will show you the
@ -479,6 +480,7 @@ class Channel(callbacks.Privmsg):
irc.reply(utils.commaAndify(map(utils.dqrepr, c.bans))) irc.reply(utils.commaAndify(map(utils.dqrepr, c.bans)))
else: else:
irc.reply('There are currently no permanent bans on %s' % channel) irc.reply('There are currently no permanent bans on %s' % channel)
permbans = privmsgs.checkChannelCapability(permbans, 'op')
def ignore(self, irc, msg, args, channel): def ignore(self, irc, msg, args, channel):
"""[<channel>] <nick|hostmask> """[<channel>] <nick|hostmask>
@ -534,7 +536,6 @@ class Channel(callbacks.Privmsg):
irc.reply(utils.commaAndify(imap(repr, L))) irc.reply(utils.commaAndify(imap(repr, L)))
ignores = privmsgs.checkChannelCapability(ignores, 'op') ignores = privmsgs.checkChannelCapability(ignores, 'op')
def addcapability(self, irc, msg, args, channel): def addcapability(self, irc, msg, args, channel):
"""[<channel>] <name|hostmask> <capability> """[<channel>] <name|hostmask> <capability>
@ -675,7 +676,6 @@ class Channel(callbacks.Privmsg):
irc.reply(utils.commaAndify(L)) irc.reply(utils.commaAndify(L))
Class = Channel Class = Channel
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: