add conditional to respond acc to kick being true or not (#1512)

Co-authored-by: Pratyush Desai <pratyush.desai@liberta.casa>
This commit is contained in:
pratyushd 2022-07-14 00:32:28 +05:30 committed by GitHub
parent 964acac058
commit 5d8f59bf80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -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