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
This commit is contained in:
parent
132cdf30d5
commit
98c24da11f
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user