- for (int j = 0; j < Conf->Enumerate("connect"); j++)
- {
- std::string hostn = Conf->ReadValue("connect","allow",j);
- /* XXX: Fixme: does not respect port, limit, etc */
- if ((InspIRCd::MatchCIDR(user->GetIPString(),hostn, ascii_case_insensitive_map)) || (InspIRCd::Match(user->host,hostn, ascii_case_insensitive_map)))
- {
- bool useident = Conf->ReadFlag("connect", "useident", "yes", j);
-
- if (!useident)
- return 0;
- }
- }
-
- /* User::ident is currently the username field from USER; with m_ident loaded, that
- * should be preceded by a ~. The field is actually IdentMax+2 characters wide. */
- if (user->ident.length() > ServerInstance->Config->Limits.IdentMax + 1)
- user->ident.assign(user->ident, 0, ServerInstance->Config->Limits.IdentMax);
- user->ident.insert(0, "~");
-
- user->WriteServ("NOTICE Auth :*** Looking up your ident...");
-
- // Get the IP that the user is connected to, and bind to that for the outgoing connection
- irc::sockets::sockaddrs laddr;
- socklen_t laddrsz = sizeof(laddr);
-
- if (getsockname(user->GetFd(), &laddr.sa, &laddrsz) != 0)
- {
- user->WriteServ("NOTICE Auth :*** Could not find your ident, using %s instead.", user->ident.c_str());
- return 0;
- }