diff options
| author | 2006-12-22 20:12:15 +0000 | |
|---|---|---|
| committer | 2006-12-22 20:12:15 +0000 | |
| commit | 49eabd1197dcd604950e6d6b6d838ba2e63188ab (patch) | |
| tree | 3d6ec0bc8a51412ef7e68ebb1be6d5f11516d453 /src/configreader.cpp | |
| parent | Reduce logging caused by mode changes (diff) | |
Refactor connect allow/deny lines
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6061 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/configreader.cpp')
| -rw-r--r-- | src/configreader.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 79c2119c6..55321770b 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -416,45 +416,13 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v if (*allow) { - c.host = allow; - c.type = CC_ALLOW; - c.pass = password; - c.registration_timeout = timeout; - c.pingtime = pingfreq; - c.flood = flood; - c.threshold = threshold; - c.sendqmax = sendq; - c.recvqmax = recvq; - c.maxlocal = localmax; - c.maxglobal = globalmax; - - - if (c.maxlocal == 0) - c.maxlocal = 3; - if (c.maxglobal == 0) - c.maxglobal = 3; - if (c.threshold == 0) - { - c.threshold = 1; - c.flood = 999; - conf->GetInstance()->Log(DEFAULT,"Warning: Connect allow line '%s' has no flood/threshold settings. Setting this tag to 999 lines in 1 second.",c.host.c_str()); - } - if (c.sendqmax == 0) - c.sendqmax = 262114; - if (c.recvqmax == 0) - c.recvqmax = 4096; - if (c.registration_timeout == 0) - c.registration_timeout = 90; - if (c.pingtime == 0) - c.pingtime = 120; + ConnectClass c(timeout, flood, allow, pingfreq, password, threshold, sendq, recvq, localmax, globalmax); conf->Classes.push_back(c); } else { - c.host = deny; - c.type = CC_DENY; + ConnectClass c(deny); conf->Classes.push_back(c); - conf->GetInstance()->Log(DEBUG,"Read connect class type DENY, host=%s",deny); } return true; |
