X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fuser_resolver.cpp;h=edfb64528cc514845bebfa91b313edd6c6efc847;hb=1913c07c2eda9c946850dfd2ebafa498ed8b2970;hp=3f010df036828bdd4245920cb5daa31b76f5f6ab;hpb=da074814501f23680b579feb1ad649c86e8a1348;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp index 3f010df03..edfb64528 100644 --- a/src/user_resolver.cpp +++ b/src/user_resolver.cpp @@ -11,7 +11,7 @@ * --------------------------------------------------- */ -/* $Core: libIRCDuserresolver */ +/* $Core */ #include "inspircd.h" @@ -71,13 +71,13 @@ void UserResolver::OnLookupComplete(const std::string &result, unsigned int ttl, if ((this->bound_user->registered != REG_ALL) && (!this->bound_user->dns_done)) { /* Hostnames starting with : are not a good thing (tm) */ - if (*(hostname.c_str()) == ':') + if (hostname[0] == ':') hostname.insert(0, "0"); this->bound_user->WriteServ("NOTICE Auth :*** Found your hostname (%s)%s", hostname.c_str(), (cached ? " -- cached" : "")); this->bound_user->dns_done = true; - strlcpy(this->bound_user->dhost, hostname.c_str(),64); - strlcpy(this->bound_user->host, hostname.c_str(),64); + this->bound_user->dhost.assign(hostname, 0, 64); + this->bound_user->host.assign(hostname, 0, 64); /* Invalidate cache */ this->bound_user->InvalidateCache(); }