summaryrefslogtreecommitdiff
path: root/src/coremods
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-08-28 15:37:15 +0100
committerPeter Powell <petpow@saberuk.com>2017-09-12 15:05:24 +0100
commitfb13dca410541f01db84287f2721d1e256eaf2b5 (patch)
tree53b1c9de79ba80719a7e054de455d86c27676384 /src/coremods
parent3b595d39a50e38283768bc6ec8aeb9e73071224f (diff)
Store the server endpoint as a sockaddrs in ListenSocket.
Diffstat (limited to 'src/coremods')
-rw-r--r--src/coremods/core_stats.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/coremods/core_stats.cpp b/src/coremods/core_stats.cpp
index b91653908..9d1fdf3fe 100644
--- a/src/coremods/core_stats.cpp
+++ b/src/coremods/core_stats.cpp
@@ -99,18 +99,10 @@ 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::string ip = ls->bind_addr;
- if (ip.empty())
- ip.assign("*");
- else if (ip.find_first_of(':') != std::string::npos)
- {
- ip.insert(ip.begin(), '[');
- ip.insert(ip.end(), ']');
- }
std::string type = ls->bind_tag->getString("type", "clients");
std::string hook = ls->bind_tag->getString("ssl", "plaintext");
- stats.AddRow(249, ip + ":"+ConvToStr(ls->bind_port) + " (" + type + ", " + hook + ")");
+ stats.AddRow(249, ls->bind_sa.str() + " (" + type + ", " + hook + ")");
}
}
break;