summaryrefslogtreecommitdiff
path: root/src/cmd_stats.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:38:00 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-11 18:38:00 +0000
commitbfcaef8623bb3f8faf1141eb7b3805ab75ae97dd (patch)
treef26d108a63a8d311c64b400e58d5d1b7eff39bec /src/cmd_stats.cpp
parentb469531385d6d65b2f9dface80fe1ab4b9e19e15 (diff)
Refactor port binding, warning not yet tested fully
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6982 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r--src/cmd_stats.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index a23dc250e..7a232e033 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -66,13 +66,14 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis
if (t->registered == REG_ALL)
pc[t->GetPort()]++;
}
- for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
+ for (size_t i = 0; i < ServerInstance->Config->ports.size(); i++)
{
- if (pc[ServerInstance->Config->ports[i]] >= 0)
+ if (pc[ServerInstance->Config->ports[i]->GetPort()] >= 0)
{
- results.push_back(sn+" 249 "+user->nick+" :p:"+ConvToStr(ServerInstance->Config->ports[i])+" (" + ConvToStr(pc[ServerInstance->Config->ports[i]])+" client" +
- (pc[ServerInstance->Config->ports[i]] != 1 ? "s" : "") + "), "+ServerInstance->Config->openSockfd[i]->GetDescription());
- pc[ServerInstance->Config->ports[i]] = -1;
+ results.push_back(sn+" 249 "+user->nick+" :p:"+ConvToStr(ServerInstance->Config->ports[i]->GetPort())+" (" +
+ ConvToStr(pc[ServerInstance->Config->ports[i]->GetPort()])+" client" + (pc[ServerInstance->Config->ports[i]->GetPort()] != 1 ? "s" : "") + "), "+
+ ServerInstance->Config->ports[i]->GetDescription());
+ pc[ServerInstance->Config->ports[i]->GetPort()] = -1;
}
}
}