diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-12 00:36:20 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-05-12 00:36:20 +0000 |
commit | b2c011a23adfb2472f51a4c18bf8f29e6e37bb04 (patch) | |
tree | a40a4658792c7b5143527c24bac2d62004254f4f /src/inspircd.cpp | |
parent | 278cc70b2514ac48fe8e2810c1789c41ca933ca9 (diff) |
Customizable by-byte-size recvq stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1365 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a4e9b1934..cf68705cb 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -357,7 +357,7 @@ void readfile(file_cache &F, const char* fname) void ReadConfig(bool bail, userrec* user) { char dbg[MAXBUF],pauseval[MAXBUF],Value[MAXBUF],timeout[MAXBUF],NB[MAXBUF],flood[MAXBUF],MW[MAXBUF]; - char AH[MAXBUF],AP[MAXBUF],AF[MAXBUF],DNT[MAXBUF],pfreq[MAXBUF],thold[MAXBUF],sqmax[MAXBUF]; + char AH[MAXBUF],AP[MAXBUF],AF[MAXBUF],DNT[MAXBUF],pfreq[MAXBUF],thold[MAXBUF],sqmax[MAXBUF],rqmax[MAXBUF]; ConnectClass c; std::stringstream errstr; @@ -464,6 +464,7 @@ void ReadConfig(bool bail, userrec* user) ConfValue("connect","pingfreq",i,pfreq,&config_f); ConfValue("connect","threshold",i,thold,&config_f); ConfValue("connect","sendq",i,sqmax,&config_f); + ConfValue("connect","recvq",i,rqmax,&config_f); if (Value[0]) { strlcpy(c.host,Value,MAXBUF); @@ -476,6 +477,7 @@ void ReadConfig(bool bail, userrec* user) c.flood = atoi(flood); c.threshold = 5; c.sendqmax = 262144; // 256k + c.recvqmax = 4096; // 4k if (atoi(thold)>0) { c.threshold = atoi(thold); @@ -484,6 +486,10 @@ void ReadConfig(bool bail, userrec* user) { c.sendqmax = atoi(sqmax); } + if (atoi(rqmax)>0) + { + c.recvqmax = atoi(rqmax); + } if (atoi(timeout)>0) { c.registration_timeout = atoi(timeout); @@ -2540,6 +2546,7 @@ void AddClient(int socket, char* host, int port, bool iscached, char* ip) int class_flood = 0; long class_threshold = 5; long class_sqmax = 262144; // 256kb + long class_rqmax = 4096; // 4k for (ClassVector::iterator i = Classes.begin(); i != Classes.end(); i++) { @@ -2550,6 +2557,7 @@ void AddClient(int socket, char* host, int port, bool iscached, char* ip) clientlist[tempnick]->pingmax = i->pingtime; class_threshold = i->threshold; class_sqmax = i->sendqmax; + class_rqmax = i->recvqmax; break; } } @@ -2559,6 +2567,7 @@ void AddClient(int socket, char* host, int port, bool iscached, char* ip) clientlist[tempnick]->flood = class_flood; clientlist[tempnick]->threshold = class_threshold; clientlist[tempnick]->sendqmax = class_sqmax; + clientlist[tempnick]->recvqmax = class_rqmax; for (int i = 0; i < MAXCHANS; i++) { |