]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dnsqueue.cpp
Decide that it wasn't quite appropriate :(
[user/henk/code/inspircd.git] / src / dnsqueue.cpp
index 3858b16aa29c422436ae50fa44291ef6dfa467a7..8be3ea99b0b742a3312866e5b5c80aca0f6cf6f3 100644 (file)
@@ -87,7 +87,7 @@ public:
        bool DoLookup(std::string nick)
        {
                hostname = "";
-               userrec* usr = Find(nick.c_str());
+               userrec* usr = Find(nick);
                if (usr)
                {
                        resolver1.SetNS(std::string(Config->DNSServer));
@@ -95,7 +95,7 @@ public:
                        {
                                return false;
                        }
-                       strlcpy(u,nick.c_str(),NICKMAX);
+                       strlcpy(u,nick.c_str(),NICKMAX-1);
 
                        /* ASSOCIATE WITH DNS LOOKUP LIST */
                        if (resolver1.GetFD() != -1)
@@ -210,7 +210,7 @@ public:
 bool lookup_dns(std::string nick)
 {
        /* First attempt to find the nickname */
-       userrec* u = Find(nick.c_str());
+       userrec* u = Find(nick);
        if (u)
        {
                /* Check the cache */