From 5d8f59bf80e6b0ff291c76b7b3106698a9f56a0e Mon Sep 17 00:00:00 2001 From: pratyushd Date: Thu, 14 Jul 2022 00:32:28 +0530 Subject: [PATCH] add conditional to respond acc to kick being true or not (#1512) Co-authored-by: Pratyush Desai --- plugins/Channel/plugin.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/Channel/plugin.py b/plugins/Channel/plugin.py index a5b82428a..d6332f9d4 100644 --- a/plugins/Channel/plugin.py +++ b/plugins/Channel/plugin.py @@ -381,8 +381,12 @@ class Channel(callbacks.Plugin): msg.prefix, bannedNick) raise callbacks.ArgumentError elif bannedNick == irc.nick: - self.log.warning('%q tried to make me kban myself.', msg.prefix) - irc.error(_('I cowardly refuse to kickban myself.')) + if kick: + self.log.warning('%q tried to make me kban myself.', msg.prefix) + irc.error(_('I cowardly refuse to kickban myself.')) + else: + self.log.warning('%q tried to make me ban myself.', msg.prefix) + irc.error(_('I cowardly refuse to ban myself.')) return if not reason: reason = msg.nick