]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/dnsqueue.cpp
added added "./configure -svnupdate rebuild"
[user/henk/code/inspircd.git] / src / dnsqueue.cpp
index 3858b16aa29c422436ae50fa44291ef6dfa467a7..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];
@@ -87,7 +85,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 +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)
@@ -210,7 +208,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 */