mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-26 04:04:22 +01:00
ircs2s_common: return just the kill reason as text in kill parsing (#520)
This commit is contained in:
parent
93fef9b923
commit
1a97a32ef5
@ -562,11 +562,14 @@ class IRCS2SProtocol(IRCCommonProtocol):
|
|||||||
killer = source
|
killer = source
|
||||||
|
|
||||||
# Get the reason, which is enclosed in brackets.
|
# Get the reason, which is enclosed in brackets.
|
||||||
reason = ' '.join(args[1].split(" ")[1:])
|
killmsg = ' '.join(args[1].split(" ")[1:])[1:-1]
|
||||||
|
if not killmsg:
|
||||||
killmsg = "Killed (%s %s)" % (killer, reason)
|
log.warning('(%s) Failed to extract kill reason: %r', irc.name, args)
|
||||||
|
killmsg = '<No reason given>'
|
||||||
else:
|
else:
|
||||||
# We already have a preformatted kill, so just pass it on as is.
|
# We already have a preformatted kill, so just pass it on as is.
|
||||||
|
# XXX: this does create a convoluted kill string if we want to forward kills
|
||||||
|
# over relay.
|
||||||
# InspIRCd:
|
# InspIRCd:
|
||||||
# <- :1MLAAAAA1 KILL 0ALAAAAAC :Killed (GL (test))
|
# <- :1MLAAAAA1 KILL 0ALAAAAAC :Killed (GL (test))
|
||||||
# ngIRCd:
|
# ngIRCd:
|
||||||
|
Loading…
Reference in New Issue
Block a user