From b7307c5b67d1cf46df7b47a1a10a82e9036587ee Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Fri, 27 Aug 2004 09:14:13 +0000 Subject: [PATCH] Respect KICKLEN. --- src/Channel.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Channel.py b/src/Channel.py index cb0be6e2d..6344d1a9b 100755 --- a/src/Channel.py +++ b/src/Channel.py @@ -39,6 +39,7 @@ __author__ = 'Jeremy Fincher (jemfinch) ' import supybot.fix as fix +import sys import time import getopt from itertools import imap @@ -273,6 +274,11 @@ class Channel(callbacks.Privmsg): return if not reason: reason = msg.nick + kicklen = irc.state.supported.get('kicklen', sys.maxint) + if len(reason) > kicklen: + irc.error('The reason you gave is longer than the allowed ' + 'length for a KICK reason on this server.') + return irc.queueMsg(ircmsgs.kick(channel, nick, reason)) kick = privmsgs.checkChannelCapability(kick, 'op')