mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-20 15:41:09 +01:00
Respect KICKLEN.
This commit is contained in:
parent
afce0547e1
commit
b7307c5b67
@ -39,6 +39,7 @@ __author__ = 'Jeremy Fincher (jemfinch) <jemfinch@users.sf.net>'
|
|||||||
|
|
||||||
import supybot.fix as fix
|
import supybot.fix as fix
|
||||||
|
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
import getopt
|
import getopt
|
||||||
from itertools import imap
|
from itertools import imap
|
||||||
@ -273,6 +274,11 @@ class Channel(callbacks.Privmsg):
|
|||||||
return
|
return
|
||||||
if not reason:
|
if not reason:
|
||||||
reason = msg.nick
|
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))
|
irc.queueMsg(ircmsgs.kick(channel, nick, reason))
|
||||||
kick = privmsgs.checkChannelCapability(kick, 'op')
|
kick = privmsgs.checkChannelCapability(kick, 'op')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user