Added STATUS command to check current conditions

This commit is contained in:
John Reese 2011-01-13 22:03:49 -05:00
parent 01885f39f4
commit 1c2e9b019b
1 changed files with 14 additions and 0 deletions

View File

@ -410,6 +410,20 @@ class CNotifoMod : public CModule
CString message = command.Token(1, true, " ", true); CString message = command.Token(1, true, " ", true);
send_message(message); 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 else
{ {
PutModule("Error: invalid command"); PutModule("Error: invalid command");