mirror of https://github.com/SeanOMik/znc-push.git
Modify GET command to optionally list all values
This commit is contained in:
parent
db077ea78a
commit
01885f39f4
22
notifo.cpp
22
notifo.cpp
|
@ -368,9 +368,27 @@ class CNotifoMod : public CModule
|
|||
// GET command
|
||||
else if (action == "get")
|
||||
{
|
||||
if (token_count != 2)
|
||||
if (token_count > 2)
|
||||
{
|
||||
PutModule("Usage: get <option>");
|
||||
PutModule("Usage: get [<option>]");
|
||||
return;
|
||||
}
|
||||
|
||||
if (token_count < 2)
|
||||
{
|
||||
CTable table;
|
||||
|
||||
table.AddColumn("Option");
|
||||
table.AddColumn("Value");
|
||||
|
||||
for (MCString::iterator i = options.begin(); i != options.end(); i++)
|
||||
{
|
||||
table.AddRow();
|
||||
table.SetCell("Option", i->first);
|
||||
table.SetCell("Value", i->second);
|
||||
}
|
||||
|
||||
PutModule(table);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue