summaryrefslogtreecommitdiff
path: root/src/cmd_stats.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd_stats.cpp')
-rw-r--r--src/cmd_stats.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cmd_stats.cpp b/src/cmd_stats.cpp
index 7197b15df..5e9252381 100644
--- a/src/cmd_stats.cpp
+++ b/src/cmd_stats.cpp
@@ -68,8 +68,12 @@ void DoStats(InspIRCd* ServerInstance, char statschar, userrec* user, string_lis
}
for (unsigned int i = 0; i < ServerInstance->stats->BoundPortCount; i++)
{
- 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());
+ if (pc[ServerInstance->Config->ports[i]] >= 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;
+ }
}
}
break;