mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 05:32:51 +01:00
Give an appropriate error message when trying to Config.channel a non-channel-value.
This commit is contained in:
parent
2ebbc80a95
commit
5ec79236a3
@ -169,6 +169,13 @@ class Config(callbacks.Privmsg):
|
||||
configuration value of <name>. <channel> 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)
|
||||
|
Loading…
Reference in New Issue
Block a user