Don't try to kick people that aren't in the channel.

This commit is contained in:
Jeremy Fincher 2004-08-16 21:26:38 +00:00
parent edf7af7711
commit eff7489469

View File

@ -268,6 +268,9 @@ class Channel(callbacks.Privmsg):
""" """
if self.haveOps(irc, channel, 'kick someone'): if self.haveOps(irc, channel, 'kick someone'):
(nick, reason) = privmsgs.getArgs(args, optional=1) (nick, reason) = privmsgs.getArgs(args, optional=1)
if nick not in irc.channels[channel].users:
irc.error('%s isn\'t in %s.' % (nick, channel))
return
if not reason: if not reason:
reason = msg.nick reason = msg.nick
irc.queueMsg(ircmsgs.kick(channel, nick, reason)) irc.queueMsg(ircmsgs.kick(channel, nick, reason))