From 5ec79236a3d3b39b69291fbf1aa883ca2379fadb Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sun, 8 Aug 2004 17:36:08 +0000 Subject: [PATCH] Give an appropriate error message when trying to Config.channel a non-channel-value. --- src/Config.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Config.py b/src/Config.py index 7b521af44..377a72d22 100644 --- a/src/Config.py +++ b/src/Config.py @@ -169,6 +169,13 @@ class Config(callbacks.Privmsg): configuration value of . is only necessary if the message isn't sent in the channel itself.""" channel = privmsgs.getChannel(msg, args) + if not args: + raise callbacks.ArgumentError + wrapper = getWrapper(args[0]) + if not wrapper.channelValue: + irc.error('That configuration variable is not a channel-specific ' + 'configuration variable.') + return components = registry.split(args[0]) components.append(channel) args[0] = registry.join(components)