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

relay: don't allow servers to forward KILLs

Closes #621.
This commit is contained in:
James Lu 2018-07-08 12:40:42 -07:00
parent 86b93ea969
commit c1f37c2236

View File

@ -1915,7 +1915,7 @@ def handle_kill(irc, numeric, command, args):
origirc = world.networkobjects[realuser[0]]
# If we're allowed to forward kills, then do so.
if _has_common_pool(irc.name, realuser[0], 'kill_share_pools'):
if _has_common_pool(irc.name, realuser[0], 'kill_share_pools') and numeric in irc.users:
def _relay_kill_loop(irc, remoteirc):
if remoteirc == origirc:
# Don't bother with get_orig_user when we relay onto the target's home net
@ -1939,7 +1939,7 @@ def handle_kill(irc, numeric, command, args):
if localchan:
# Forward kills as kicks in all channels that the sender has CLAIM access to.
if check_claim(irc, localchan, numeric):
if check_claim(irc, localchan, numeric) and numeric in irc.users:
target_nick = origirc.get_friendly_name(realuser[1])
def _relay_kill_to_kick(origirc, remoteirc, rtarget):