diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 22:01:02 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-04 22:01:02 +0000 |
commit | c83932ecfda0359e1b9a6bb5a48c8dafc80737ab (patch) | |
tree | 4d26e45cc589f07386b10099d9c3e6810988f14f /src | |
parent | 26095e43d92aab898ca3df2f386837b5b674f668 (diff) |
Fix for bug #274, same port appearing multiple times in stats p if bound multiple times on different ip addresses
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6882 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd_stats.cpp | 8 |
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; |