- 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)) || (InspIRCd::Match(user->host,hostn)))
- {
- bool useident = Conf->ReadFlag("connect", "useident", 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, "~");
+ ConfigTag* tag = user->MyClass->config;
+ if (!tag->getBool("useident", true))
+ return;