]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
m_cgiirc Don't apply resolved host or send notifications when the user is quitting...
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index 22a5243b89791edc7028e452d3dd19a478450252..f6ad5992a78df10e66c3e3353fa1f599892e0dcb 100644 (file)
@@ -130,7 +130,7 @@ class CGIResolver : public Resolver
        {
                /* Check the user still exists */
                User* them = ServerInstance->FindUUID(theiruid);
-               if (them)
+               if ((them) && (!them->quitting))
                {
                        if (notify)
                                ServerInstance->SNO->WriteGlobalSno('a', "Connecting user %s detected as using CGI:IRC (%s), changing real host to %s from %s", them->nick.c_str(), them->host.c_str(), result.c_str(), typ.c_str());
@@ -146,11 +146,13 @@ class CGIResolver : public Resolver
 
        virtual void OnError(ResolverError e, const std::string &errormessage)
        {
+               if (!notify)
+                       return;
+
                User* them = ServerInstance->FindUUID(theiruid);
-               if (them)
+               if ((them) && (!them->quitting))
                {
-                       if (notify)
-                               ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
+                       ServerInstance->SNO->WriteToSnoMask('a', "Connecting user %s detected as using CGI:IRC (%s), but their host can't be resolved from their %s!", them->nick.c_str(), them->host.c_str(), typ.c_str());
                }
        }