mirror of https://github.com/SeanOMik/znc-push.git
Added STATUS command to check current conditions
This commit is contained in:
parent
01885f39f4
commit
1c2e9b019b
14
notifo.cpp
14
notifo.cpp
|
@ -410,6 +410,20 @@ class CNotifoMod : public CModule
|
|||
CString message = command.Token(1, true, " ", true);
|
||||
send_message(message);
|
||||
}
|
||||
// STATUS command
|
||||
else if (action == "status")
|
||||
{
|
||||
CTable table;
|
||||
|
||||
table.AddColumn("Condition");
|
||||
table.AddColumn("Status");
|
||||
|
||||
table.AddRow();
|
||||
table.SetCell("Condition", "client_count");
|
||||
table.SetCell("Status", CString(client_count()));
|
||||
|
||||
PutModule(table);
|
||||
}
|
||||
else
|
||||
{
|
||||
PutModule("Error: invalid command");
|
||||
|
|
Loading…
Reference in New Issue