mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-20 17:53:03 +01:00
Added removeChannel to the SpaceSeparatedListOfChannels.
This commit is contained in:
parent
a898bdaa94
commit
ae97d0390a
11
src/conf.py
11
src/conf.py
@ -121,6 +121,17 @@ class SpaceSeparatedSetOfChannels(registry.SeparatedListOf):
|
||||
return s.split()
|
||||
joiner = ' '.join
|
||||
|
||||
def removeChannel(self, channel):
|
||||
removals = []
|
||||
for c in self.value:
|
||||
chan = c
|
||||
if ',' in c:
|
||||
(chan, _) = c.split(',')
|
||||
if chan == channel:
|
||||
removals.append(c)
|
||||
for removal in removals:
|
||||
self.value.remove(discard)
|
||||
|
||||
supybot.register('channels', SpaceSeparatedSetOfChannels(['#supybot'], """
|
||||
Determines what channels the bot will join when it connects to the server."""))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user