From 243c6635da38021c99a0388ac73341d549241663 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 3 Jan 2022 13:51:46 +0100 Subject: [PATCH] Update /STATS P output a little (since it shows the control channel). --- src/modules/stats.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/modules/stats.c b/src/modules/stats.c index 6b62dcd4e..bb14cee24 100644 --- a/src/modules/stats.c +++ b/src/modules/stats.c @@ -540,11 +540,20 @@ static char *stats_port_helper(ConfigItem_listen *listener) { static char buf[256]; - ircsnprintf(buf, sizeof(buf), "%s%s%s%s", + ircsnprintf(buf, sizeof(buf), "%s%s%s", (listener->options & LISTENER_CLIENTSONLY)? "clientsonly ": "", (listener->options & LISTENER_SERVERSONLY)? "serversonly ": "", - (listener->options & LISTENER_TLS)? "tls ": "", - !(listener->options & LISTENER_TLS)? "plaintext ": ""); + (listener->options & LISTENER_DEFER_ACCEPT)? "defer-accept ": ""); + + /* And one of these.. */ + if (listener->options & LISTENER_CONTROL) + strlcat(buf, "control ", sizeof(buf)); + else if (listener->socket_type == SOCKET_TYPE_UNIX) + ; + else if (listener->options & LISTENER_TLS) + strlcat(buf, "tls ", sizeof(buf)); + else + strlcat(buf, "plaintext ", sizeof(buf)); return buf; }