From e2a3b481147625979c886bd697617766d0f0a15d Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Wed, 17 Jun 2015 20:29:17 +0200 Subject: degesch: add /stats --- degesch.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/degesch.c b/degesch.c index 6b3520b..6f4a536 100644 --- a/degesch.c +++ b/degesch.c @@ -6508,6 +6508,20 @@ handle_command_motd (struct app_context *ctx, char *arguments) return true; } +static bool +handle_command_stats (struct app_context *ctx, char *arguments) +{ + if (!server_command_check (ctx, "stats", true)) + return true; + + struct server *s = ctx->current_buffer->server; + if (*arguments) + irc_send (s, "STATS %s", arguments); + else + irc_send (s, "STATS"); + return true; +} + static bool handle_command_away (struct app_context *ctx, char *arguments) { @@ -6647,6 +6661,9 @@ g_command_handlers[] = { "motd", "Get the Message of The Day", NULL, handle_command_motd }, + { "stats", "Query server statistics", + "[ []]", + handle_command_stats }, { "away", "Set away status", "[]", handle_command_away }, -- cgit v1.2.3-70-g09d2