summaryrefslogtreecommitdiff
path: root/src/stats.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-31 19:54:18 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-31 19:54:18 +0000
commit7fdd55570ea6269c096e6a3c8eae30c1a1587533 (patch)
treea1da62bdcb175e043493d39003f4fab1dae95f7b /src/stats.cpp
parent1cda046fed93adef23eee9e2c21abfdf7c863e34 (diff)
Update connect block matching on rehash to prefer names, show more useful information in /STATS i
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12337 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/stats.cpp')
-rw-r--r--src/stats.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/src/stats.cpp b/src/stats.cpp
index 83beae03a..9d1970b3b 100644
--- a/src/stats.cpp
+++ b/src/stats.cpp
@@ -65,12 +65,31 @@ void InspIRCd::DoStats(char statschar, User* user, string_list &results)
case 'i':
{
- int idx = 0;
for (ClassVector::iterator i = this->Config->Classes.begin(); i != this->Config->Classes.end(); i++)
{
ConnectClass* c = *i;
- results.push_back(sn+" 215 "+user->nick+" i NOMATCH * "+c->GetHost()+" "+ConvToStr(c->limit ? c->limit : this->SE->GetMaxFds())+" "+ConvToStr(idx)+" "+this->Config->ServerName+" *");
- idx++;
+ std::stringstream res;
+ res << sn << " 215 " << user->nick << " I " << c->name << ' ';
+ if (c->type == CC_ALLOW)
+ res << '+';
+ if (c->type == CC_DENY)
+ res << '-';
+
+ if (c->type == CC_NAMED)
+ res << '*';
+ else
+ res << c->host;
+
+ if (c->port)
+ res << ' ' << c->port << ' ';
+ else
+ res << " * ";
+
+ res << c->GetRecvqMax() << ' ' << c->GetSendqSoftMax() << ' ' << c->GetSendqHardMax()
+ << ' ' << c->GetCommandRate() << ' ' << c->GetPenaltyThreshold();
+ if (c->fakelag)
+ res << '*';
+ results.push_back(res.str());
}
}
break;
@@ -81,6 +100,7 @@ void InspIRCd::DoStats(char statschar, User* user, string_list &results)
for (ClassVector::iterator i = this->Config->Classes.begin(); i != this->Config->Classes.end(); i++)
{
ConnectClass* c = *i;
+ results.push_back(sn+" 215 "+user->nick+" i NOMATCH * "+c->GetHost()+" "+ConvToStr(c->limit ? c->limit : this->SE->GetMaxFds())+" "+ConvToStr(idx)+" "+this->Config->ServerName+" *");
results.push_back(sn+" 218 "+user->nick+" Y "+ConvToStr(idx)+" "+ConvToStr(c->GetPingTime())+" 0 "+ConvToStr(c->GetSendqHardMax())+" :"+
ConvToStr(c->GetRecvqMax())+" "+ConvToStr(c->GetRegTimeout()));
idx++;