- for (int j = 0; j < Conf->Enumerate("connect"); j++)
- {
- std::string hostn = Conf->ReadValue("connect","allow",j);
- if ((match(user->GetIPString(),hostn.c_str(),true)) || (match(user->host,hostn.c_str())))
- {
- std::string ThisModes = Conf->ReadValue("connect","modes",j);
- if (!ThisModes.empty())
- {
- std::string buf;
- stringstream ss(ThisModes);
-
- vector<string> tokens;
-
- // split ThisUserModes into modes and mode params
- while (ss >> buf)
- tokens.push_back(buf);
-
- int size = tokens.size() + 1;
- const char** modes = new const char*[size];
- modes[0] = user->nick;
- modes[1] = tokens[0].c_str();