From 1c2e9b019b3585654bf85297c5095d8ff78470e0 Mon Sep 17 00:00:00 2001 From: John Reese Date: Thu, 13 Jan 2011 22:03:49 -0500 Subject: [PATCH] Added STATUS command to check current conditions --- notifo.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/notifo.cpp b/notifo.cpp index 351d594..c41774d 100644 --- a/notifo.cpp +++ b/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");