1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 14:33:12 +02:00

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".
This commit is contained in:
Bram Matthys
2024-11-17 08:03:32 +01:00
parent 4e11d81d67
commit 08fb2b46ac
+2 -2
View File
@@ -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));
}
}