mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-11 20:52:42 +01:00
Fix possible raised RuntimeError.
This commit is contained in:
parent
4396d65b94
commit
cf4b0da422
@ -204,10 +204,14 @@ class Admin(privmsgs.CapabilityCheckingPrivmsg):
|
|||||||
irc.error('I\'m not currently in %s' % arg)
|
irc.error('I\'m not currently in %s' % arg)
|
||||||
return
|
return
|
||||||
for arg in args:
|
for arg in args:
|
||||||
|
L = []
|
||||||
for channelWithPass in conf.supybot.channels():
|
for channelWithPass in conf.supybot.channels():
|
||||||
channel = channelWithPass.split(',')[0]
|
channel = channelWithPass.split(',')[0]
|
||||||
if arg == channel:
|
if arg == channel:
|
||||||
conf.supybot.channels().remove(channelWithPass)
|
L.append(channelWithPass)
|
||||||
|
# This is necessary so the set doesn't change size while iterating.
|
||||||
|
for channel in L:
|
||||||
|
conf.supybot.channels().remove(channel)
|
||||||
irc.queueMsg(ircmsgs.parts(args, msg.nick))
|
irc.queueMsg(ircmsgs.parts(args, msg.nick))
|
||||||
|
|
||||||
def disable(self, irc, msg, args):
|
def disable(self, irc, msg, args):
|
||||||
|
Loading…
Reference in New Issue
Block a user