summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-03-08 13:22:13 +0000
committerSadie Powell <sadie@witchery.services>2021-03-08 13:22:13 +0000
commita670bd81f6b22e2cecf9a21cf8592bc0a1e7fb95 (patch)
tree369eac15d8c10ad5c44e152c821314804690e292 /src/coremods
parentfd6cb9cabafe32bddecdb71c96a0812fd8185e4c (diff)
Fix the `STATS p` output being ambiguous.
- Add the middle I/O hook to the stats output. - Make it obvious what the various fields actually are.
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_stats.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index 9dddcb3a5..d6703872e 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -117,10 +117,21 @@ void CommandStats::DoStats(Stats::Context& stats)
for (std::vector<ListenSocket*>::const_iterator i = ServerInstance->ports.begin(); i != ServerInstance->ports.end(); ++i)
{
ListenSocket* ls = *i;
+ std::stringstream portentry;
+
const std::string type = ls->bind_tag->getString("type", "clients", 1);
- const std::string hook = ls->bind_tag->getString("ssl", "plaintext", 1);
+ portentry << ls->bind_sa.str() << " (type: " << type;
+
+ const std::string hook = ls->bind_tag->getString("hook");
+ if (!hook.empty())
+ portentry << ", hook: " << hook;
+
+ const std::string sslprofile = ls->bind_tag->getString("ssl");
+ if (!sslprofile.empty())
+ portentry << ", ssl profile: " << sslprofile;
- stats.AddRow(249, ls->bind_sa.str() + " (" + type + ", " + hook + ")");
+ portentry << ')';
+ stats.AddRow(249, portentry.str());
}
}
break;