]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Add <hostchange:ports> to the m_hostchange module to implement feature in bug #363
[user/henk/code/inspircd.git] / src / configreader.cpp
index c1ccc4ee9a37a6bc6f0797f1308de11d2f0c8579..b3258eb2ee1702d1532a1b53f56583a26301a2d3 100644 (file)
@@ -407,19 +407,19 @@ 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)
        {
                /* Find 'parent' and inherit a new class from it,
                 * then overwrite any values that are set here
                 */
-               for (std::vector<ConnectClass>::iterator item = conf->Classes.begin(); item != conf->Classes.end(); ++item)
+               for (ClassVector::iterator item = conf->Classes.begin(); item != conf->Classes.end(); ++item)
                {
                        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, std::string(*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,7 +672,7 @@ 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",
@@ -680,7 +680,7 @@ void ServerConfig::Read(bool bail, userrec* user)
                                 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",