X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=d93a1d4d8b843b43f00212ab0afa9a67cfbfbb09;hb=b7e299c2e10d915d5e59df4cb3f54951c8daa999;hp=189fbb59b94173e4e326f43eea4376fa64a2aee8;hpb=c61fac32bc7559e3d6f7534919f115266eee5917;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 189fbb59b..d93a1d4d8 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -407,6 +407,7 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v int port = values[11].GetInteger(); const char* name = values[12].GetString(); const char* parent = values[13].GetString(); + int maxchans = values[14].GetInteger(); if (*parent) { @@ -418,8 +419,7 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v if (item->GetName() == name) { ConnectClass c(name, *item); - c.Update(timeout, flood, std::string(*allow ? allow : deny), pingfreq, password, threshold, sendq, recvq, localmax, globalmax, 0); - c.SetPort(port); + c.Update(timeout, flood, *allow ? allow : deny, pingfreq, password, threshold, sendq, recvq, localmax, globalmax, maxchans, port); conf->Classes.push_back(c); } } @@ -429,7 +429,7 @@ bool DoConnect(ServerConfig* conf, const char* tag, char** entries, ValueList &v { if (*allow) { - ConnectClass c(name, timeout, flood, allow, pingfreq, password, threshold, sendq, recvq, localmax, globalmax); + ConnectClass c(name, timeout, flood, allow, pingfreq, password, threshold, sendq, recvq, localmax, globalmax, maxchans); c.SetPort(port); conf->Classes.push_back(c); } @@ -672,15 +672,15 @@ void ServerConfig::Read(bool bail, userrec* user) {"connect", {"allow", "deny", "password", "timeout", "pingfreq", "flood", "threshold", "sendq", "recvq", "localmax", "globalmax", "port", - "name", "parent", + "name", "parent", "maxchans", NULL}, {"", "", "", "", "120", "", "", "", "", "3", "3", "0", - "", "", + "", "", "0", NULL}, {DT_CHARPTR, DT_CHARPTR, DT_CHARPTR, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, DT_INTEGER, - DT_CHARPTR, DT_CHARPTR}, + DT_CHARPTR, DT_CHARPTR, DT_INTEGER}, InitConnect, DoConnect, DoneConnect}, {"uline",