From ae97d0390a815478357ff911047f9f12ae880c34 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 25 Mar 2004 12:15:57 +0000 Subject: [PATCH] Added removeChannel to the SpaceSeparatedListOfChannels. --- src/conf.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/conf.py b/src/conf.py index c72899987..e7cb534f2 100644 --- a/src/conf.py +++ b/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."""))