From 4f40faeaf0c3f4abd183d3684dadcf1b1782bebd Mon Sep 17 00:00:00 2001 From: James Lu Date: Tue, 1 Sep 2015 22:02:34 -0700 Subject: [PATCH] relay: in logs, be a bit more specific why we're blocking KILLs and KICKs --- plugins/relay.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/relay.py b/plugins/relay.py index b497888..4138f9d 100644 --- a/plugins/relay.py +++ b/plugins/relay.py @@ -436,14 +436,14 @@ def handle_kick(irc, source, command, args): # Join the kicked client back with its respective modes. irc.proto.sjoinServer(irc, irc.sid, channel, [(modes, target)]) if kicker in irc.users: - log.info('(%s) Blocked KICK (reason %r) from %s to relay client %s/%s on %s.', + log.info('(%s) Relay claim: Blocked KICK (reason %r) from %s to relay client %s/%s on %s.', irc.name, args['text'], irc.users[source].nick, remoteirc.users[real_target].nick, remoteirc.name, channel) utils.msg(irc, kicker, "This channel is claimed; your kick to " "%s has been blocked because you are not " "(half)opped." % channel, notice=True) else: - log.info('(%s) Blocked KICK (reason %r) from server %s to relay client %s/%s on %s.', + log.info('(%s) Relay claim: Blocked KICK (reason %r) from server %s to relay client %s/%s on %s.', irc.name, args['text'], irc.servers[source].name, remoteirc.users[real_target].nick, remoteirc.name, channel) return @@ -681,7 +681,7 @@ def handle_kill(irc, numeric, command, args): client = getRemoteUser(remoteirc, irc, realuser[1]) irc.proto.sjoinServer(irc, irc.sid, localchan, [(modes, client)]) if userdata and numeric in irc.users: - log.info('(%s) Blocked KILL (reason %r) from %s to relay client %s/%s.', + log.info('(%s) Relay claim: Blocked KILL (reason %r) from %s to relay client %s/%s.', irc.name, args['text'], irc.users[numeric].nick, remoteirc.users[realuser[1]].nick, realuser[0]) utils.msg(irc, numeric, "Your kill to %s has been blocked " @@ -689,7 +689,7 @@ def handle_kill(irc, numeric, command, args): " users over the relay at this time." % \ userdata.nick, notice=True) else: - log.info('(%s) Blocked KILL (reason %r) from server %s to relay client %s/%s.', + log.info('(%s) Relay claim: Blocked KILL (reason %r) from server %s to relay client %s/%s.', irc.name, args['text'], irc.servers[numeric].name, remoteirc.users[realuser[1]].nick, realuser[0]) # Target user was local.