]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dnsqueue.cpp
Improved strhashcomp with no allocations
[user/henk/code/inspircd.git] / src / dnsqueue.cpp
index 7dcc78e839c971ee6e1fed2a61b06677dd2f11f6..6d62b7ede9a228ec8d2bd2df58882c3d22f368bf 100644 (file)
@@ -53,8 +53,6 @@ using namespace std;
 extern ServerConfig* Config;
 extern InspIRCd* ServerInstance;
 
-address_cache addrcache;
-
 class Lookup;
 
 Lookup* dnslist[MAX_DESCRIPTORS];
@@ -71,11 +69,13 @@ public:
        Lookup()
        {
                *u = 0;
+               hostname = "";
        }
 
        void Reset()
        {
                *u = 0;
+               hostname = "";
        }
 
        ~Lookup()
@@ -93,7 +93,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)