From f69f1cf652d5dab0b18448db821cd3e3bfbf4e7a Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 20 Dec 2004 03:05:09 +0000 Subject: [PATCH] Fix bug in Channel.addcapability. --- src/Channel.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/Channel.py b/src/Channel.py index 58e8a4ea0..00375d6b7 100755 --- a/src/Channel.py +++ b/src/Channel.py @@ -547,19 +547,14 @@ class Channel(callbacks.Privmsg): irc.reply(utils.commaAndify(imap(repr, L))) ignores = wrap(ignores, [('checkChannelCapability', 'op')]) - def addcapability(self, irc, msg, args, channel, hostmask, capabilities): - """[] [ ...] + def addcapability(self, irc, msg, args, channel, user, capabilities): + """[] [ ...] If you have the #channel,op capability, this will give the user - currently identified as (or the user to whom maps) + (or the user to whom maps) the capability in the channel. is only necessary if the message isn't sent in the channel itself. """ - try: - id = ircdb.users.getUserId(hostmask) - user = ircdb.users.getUser(id) - except KeyError: - irc.errorNoUser(Raise=True) for c in capabilities.split(): c = ircdb.makeChannelCapability(channel, c) user.addCapability(c) @@ -568,7 +563,7 @@ class Channel(callbacks.Privmsg): addcapability = wrap(addcapability, [('checkChannelCapability', 'op'), 'otherUser', 'capability']) - def removecapability(self, irc, msg, args, channel, hostmask, capabilities): + def removecapability(self, irc, msg, args, channel, user, capabilities): """[] [ ...] If you have the #channel,op capability, this will take from the user @@ -576,11 +571,6 @@ class Channel(callbacks.Privmsg): the capability in the channel. is only necessary if the message isn't sent in the channel itself. """ - try: - id = ircdb.users.getUserId(hostmask) - except KeyError: - irc.errorNoUser(Raise=True) - user = ircdb.users.getUser(id) fail = [] for c in capabilities.split(): cap = ircdb.makeChannelCapability(channel, c)