3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

opercmds: more consistent formatting for KILL messages

Any "Killed (sender (...)" prefixes should be added by the protocol module.
This commit is contained in:
James Lu 2021-12-25 01:01:10 -08:00
parent d6de0d97f3
commit 2915bf2236

View File

@ -406,14 +406,7 @@ def kill(irc, source, args):
userdata = irc.users.get(targetu)
# Deliver a more complete kill reason if our target is a non-PyLink client.
# We skip this for PyLink clients so that relayed kills don't get
# "Killed (abc (...))" tacked on both here and by the receiving IRCd.
if not irc.is_internal_client(targetu):
reason = "Killed (%s (Requested by %s: %s))" % (
irc.get_friendly_name(sender),
irc.get_friendly_name(source),
reason)
reason = "Requested by %s: %s" % (irc.get_friendly_name(source), reason)
irc.kill(sender, targetu, reason)