- int flood = values[5].GetInteger();
- int threshold = values[6].GetInteger();
- int sendq = values[7].GetInteger();
- int recvq = values[8].GetInteger();
- int localmax = values[9].GetInteger();
- int globalmax = values[10].GetInteger();
- int port = values[11].GetInteger();
- const char* name = values[12].GetString();
- const char* parent = values[13].GetString();
- int maxchans = values[14].GetInteger();
- unsigned long limit = values[15].GetInteger();
- const char* hashtype = values[16].GetString();
-
- /*
- * duplicates check: Now we don't delete all connect classes on rehash, we need to ensure we don't add dupes.
- * easier said than done, but for now we'll just disallow anything with a duplicate host or name. -- w00t
- */
- for (ClassVector::iterator item = conf->Classes.begin(); item != conf->Classes.end(); ++item)
- {
- ConnectClass* cc = *item;
- if (
- ((*name && (cc->GetName() == name)) || // if the name is the same
- (*allow && (cc->GetHost() == allow)) || // or the allow is the same
- (*deny && (cc->GetHost() == deny))) && // or the deny is the same
- (!port || (port && (cc->GetPort() == port))) // and there is no port, or there is a port and the port is the same
- )
- {
- /* reenable class so users can be shoved into it :P */
- cc->SetDisabled(false);
- conf->GetInstance()->Logs->Log("CONFIG",DEFAULT, "Not adding class, it already exists!");
- return true;
- }
- }
+ int sendq = values[5].GetInteger();
+ int recvq = values[6].GetInteger();
+ int localmax = values[7].GetInteger();
+ int globalmax = values[8].GetInteger();
+ int port = values[9].GetInteger();
+ const char* name = values[10].GetString();
+ const char* parent = values[11].GetString();
+ int maxchans = values[12].GetInteger();
+ unsigned long limit = values[13].GetInteger();
+ const char* hashtype = values[14].GetString();