From 179fc878664127ea7ae3aa615dc0775751af8c70 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 10 Dec 2004 23:21:52 +0000 Subject: [PATCH] Refuse to kick self. --- src/Channel.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Channel.py b/src/Channel.py index 9cd849b81..c320c4cde 100755 --- a/src/Channel.py +++ b/src/Channel.py @@ -271,9 +271,8 @@ class Channel(callbacks.Privmsg): is only necessary if the message isn't sent in the channel itself. """ - if nick not in irc.state.channels[channel].users: - irc.error('%s isn\'t in %s.' % (nick, channel)) - return + if ircutils.strEqual(nick, irc.nick): + irc.error('I cowardly refuse to kick myself.', Raise=True) if not reason: reason = msg.nick kicklen = irc.state.supported.get('kicklen', sys.maxint)