X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fuser_resolver.cpp;h=8dec4c5419f38c7ae365112c3c8c9f2ac700c3f4;hb=e3e748b78683ac005b4c85360806ea6ec27d40c9;hp=b962be7817d82f00d2a3f6d162b7050ea4afaecb;hpb=4b856bda135a08e800b96c970a10b0b6a34d433a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/user_resolver.cpp b/src/user_resolver.cpp index b962be781..8dec4c541 100644 --- a/src/user_resolver.cpp +++ b/src/user_resolver.cpp @@ -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; this->bound_user->dhost.assign(hostname, 0, 64); - strlcpy(this->bound_user->host, hostname.c_str(),64); + this->bound_user->host.assign(hostname, 0, 64); /* Invalidate cache */ this->bound_user->InvalidateCache(); }