From 08fb2b46acff455aa1f35cb80adf13fdadb3ab05 Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Sun, 17 Nov 2024 08:03:32 +0100 Subject: [PATCH] Fix crash with "STATS S" if having vhosts with autologin (no login). This crash is only triggerable by IRCOps. Also, it shouldn't lists vhosts with "STATS S", it should be "STATS V". --- src/modules/vhost.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/vhost.c b/src/modules/vhost.c index bdd0a70c7..d4d9bf740 100644 --- a/src/modules/vhost.c +++ b/src/modules/vhost.c @@ -334,7 +334,7 @@ static int stats_vhost(Client *client, const char *flag) ConfigItem_vhost *vhosts; NameValuePrioList *m; - if (strcmp(flag, "S") && strcasecmp(flag, "vhost")) + if (strcmp(flag, "V") && strcasecmp(flag, "vhost")) return 0; /* Not for us */ for (vhosts = conf_vhost; vhosts; vhosts = vhosts->next) @@ -345,7 +345,7 @@ static int stats_vhost(Client *client, const char *flag) vhosts->virtuser ? vhosts->virtuser : "", vhosts->virtuser ? "@" : "", vhosts->virthost, - vhosts->login, + vhosts->login ? vhosts->login : "*", namevalue_nospaces(m)); } }