Allow channel keys in registry.

This commit is contained in:
Stéphan Kochen 2004-02-10 00:00:27 +00:00
parent f186dd01fa
commit 85fc5f25be

View File

@ -83,7 +83,11 @@ class ValidNick(registry.String):
class ValidChannel(registry.String): class ValidChannel(registry.String):
def setValue(self, v): def setValue(self, v):
if not ircutils.isChannel(v): if ',' in v:
(channel, _) = v.split(',', 1)
else:
channel = v
if not ircutils.isChannel(channel):
raise registry.InvalidRegistryValue, \ raise registry.InvalidRegistryValue, \
'Value must be a valid IRC channel name.' 'Value must be a valid IRC channel name.'
else: else: