]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Fix potential for duplicate SID if the SID is auto generated.
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index d82705d8179947e787e0b876ff3da9ec655ed31b..49a6fdabb454a1229083354dd2b2024278b6f820 100644 (file)
@@ -12,9 +12,7 @@
  */
 
 #include "inspircd.h"
-#include "users.h"
-#include "modules.h"
-#include "dns.h"
+
 #ifndef WINDOWS
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -91,8 +89,11 @@ class CGIResolver : public Resolver
        CGIResolver(Module* me, InspIRCd* ServerInstance, bool NotifyOpers, const std::string &source, bool forward, userrec* u, int userfd, const std::string &type, bool &cached)
                : Resolver(ServerInstance, source, forward ? DNS_QUERY_A : DNS_QUERY_PTR4, cached, me), typ(type), theirfd(userfd), them(u), notify(NotifyOpers) { }
 
-       virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached)
+       virtual void OnLookupComplete(const std::string &result, unsigned int ttl, bool cached, int resultnum = 0)
        {
+               if (resultnum)
+                       return;
+
                /* Check the user still exists */
                if ((them) && (them == ServerInstance->SE->GetRef(theirfd)))
                {