mirror of https://github.com/SeanOMik/znc-push.git
Modify SET command to accept space-separated values
In preparation for nick_blacklist, which needs to allow input of a space-separated list of nicks to ignore, the SET command shouldn't be requirement an exact number of tokens. Any tokens past the first three should be included in the option's new value, such that a command like "set nick_blacklist nick1 nick2 nick3" will be accepted.
This commit is contained in:
parent
54f9607f0d
commit
6fb80cff1f
|
@ -376,14 +376,14 @@ class CNotifoMod : public CModule
|
|||
// SET command
|
||||
if (action == "set")
|
||||
{
|
||||
if (token_count != 3)
|
||||
if (token_count < 3)
|
||||
{
|
||||
PutModule("Usage: set <option> <value>");
|
||||
return;
|
||||
}
|
||||
|
||||
CString option = tokens[1].AsLower();
|
||||
CString value = tokens[2];
|
||||
CString value = command.Token(2, true, " ");
|
||||
MCString::iterator pos = options.find(option);
|
||||
|
||||
if (pos == options.end())
|
||||
|
|
Loading…
Reference in New Issue