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:
@@ -93,6 +93,13 @@ class CheckAccess(irc.client.SimpleIRCClient):
|
|||||||
self.current_channel = None
|
self.current_channel = None
|
||||||
self.advance()
|
self.advance()
|
||||||
return
|
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'):
|
if msg.startswith('End of'):
|
||||||
found = False
|
found = False
|
||||||
for nick, flags, msg in self.current_list:
|
for nick, flags, msg in self.current_list:
|
||||||
|
|||||||
Reference in New Issue
Block a user