X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fuser_resolver.cpp;h=9c530506dfa412d985e1dd2c397b1236406639bf;hb=551d687ec6d7ce44be35fae0dd7345fe73c4f63a;hp=f18fc9a0385a29604ec5586bd3d276e7a8de2d8f;hpb=44f42a13de52c8025942ddab42f51feb36821782;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp index f18fc9a03..9c530506d 100644 --- a/src/user_resolver.cpp +++ b/src/user_resolver.cpp @@ -31,11 +31,11 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, LocalUser* bound_user = (LocalUser*)ServerInstance->FindUUID(uuid); if (!bound_user) { - ServerInstance->Logs->Log("RESOLVER", DEBUG, "Resolution finished for user '%s' who is gone", uuid.c_str()); + ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG, "Resolution finished for user '%s' who is gone", uuid.c_str()); return; } - ServerInstance->Logs->Log("RESOLVER", DEBUG, "DNS result for %s: '%s' -> '%s'", uuid.c_str(), input.c_str(), result.c_str()); + ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG, "DNS result for %s: '%s' -> '%s'", uuid.c_str(), input.c_str(), result.c_str()); if (!fwd) { @@ -62,7 +62,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, } catch (CoreException& e) { - ServerInstance->Logs->Log("RESOLVER", DEBUG,"Error in resolver: %s",e.GetReason()); + ServerInstance->Logs->Log("RESOLVER", LOG_DEBUG,"Error in resolver: %s",e.GetReason()); } } else @@ -87,7 +87,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, rev_match = !memcmp(&user_ip->in4.sin_addr, &res_bin, sizeof(res_bin)); } } - + if (rev_match) { std::string hostname = bound_user->stored_host; @@ -112,7 +112,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, { if (!bound_user->dns_done) { - bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", bound_user->GetIPString()); + bound_user->WriteServ("NOTICE Auth :*** Your hostname is longer than the maximum of 64 characters, using your IP address (%s) instead.", bound_user->GetIPString().c_str()); bound_user->dns_done = true; } } @@ -121,7 +121,7 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, { if (!bound_user->dns_done) { - bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", bound_user->GetIPString()); + bound_user->WriteServ("NOTICE Auth :*** Your hostname does not match up with your IP address. Sorry, using your IP address (%s) instead.", bound_user->GetIPString().c_str()); bound_user->dns_done = true; } } @@ -136,7 +136,7 @@ void UserResolver::OnError(ResolverError e, const std::string &errormessage) LocalUser* bound_user = (LocalUser*)ServerInstance->FindUUID(uuid); if (bound_user) { - bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), bound_user->GetIPString()); + bound_user->WriteServ("NOTICE Auth :*** Could not resolve your hostname: %s; using your IP address (%s) instead.", errormessage.c_str(), bound_user->GetIPString().c_str()); bound_user->dns_done = true; bound_user->stored_host.resize(0); ServerInstance->stats->statsDnsBad++;