From 98c24da11f29053bbad3718cffced90735edb5cf Mon Sep 17 00:00:00 2001 From: Jens Harbott Date: Thu, 30 Nov 2017 06:38:04 +0000 Subject: [PATCH] Fix handling of locked channels in access check When a channels is being removed according to [1], the access check will currently loop forever trying to get information for that channel, ignoring the You are not authorized to perform this operation. message that chanserv is sending. Instead we should fail on that scenario. [1] https://docs.openstack.org/infra/system-config/irc.html#renaming-an-irc-channel Depends-On: Ie7593223564b376f6bac072b7afc3449e90ea1f9 Change-Id: I1fe813c16b243bf78dcc6af9ff385cf77087c388 --- tools/check_irc_access.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/check_irc_access.py b/tools/check_irc_access.py index fb6c7c2686..41dcb2dbee 100755 --- a/tools/check_irc_access.py +++ b/tools/check_irc_access.py @@ -93,6 +93,13 @@ class CheckAccess(irc.client.SimpleIRCClient): self.current_channel = None self.advance() return + if msg.endswith('not authorized to perform this operation.'): + self.failed = True + print("%s can not be queried from ChanServ." % + self.current_channel) + self.current_channel = None + self.advance() + return if msg.startswith('End of'): found = False for nick, flags, msg in self.current_list: