]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
Define comparator for irc::sockets::sockaddrs
[user/henk/code/inspircd.git] / src / users.cpp
index d30526186a4b87c9f2a3c0f21f06b0c0464493ab..6f28806593c8501cdad3b4543eef3540d3a59064 100644 (file)
@@ -113,6 +113,8 @@ void LocalUser::StartDNSLookup()
        catch (CoreException& e)
        {
                ServerInstance->Logs->Log("USERS", DEBUG,"Error in resolver: %s",e.GetReason());
+               dns_done = true;
+               ServerInstance->stats->statsDnsBad++;
        }
 }
 
@@ -782,6 +784,7 @@ void LocalUser::FullConnect()
         * may put the user into a totally seperate class with different restrictions! so we *must* check again.
         * Don't remove this! -- w00t
         */
+       MyClass = NULL;
        SetClass();
        CheckClass();
        CheckLines();
@@ -816,6 +819,9 @@ void LocalUser::FullConnect()
        if (!MOD_RESULT)
                ServerInstance->CallCommandHandler(command, parameters, this);
 
+       if (ServerInstance->Config->RawLog)
+               WriteServ("PRIVMSG %s :*** Raw I/O logging is enabled on this server. All messages, passwords, and commands are being recorded.", nick.c_str());
+
        /*
         * We don't set REG_ALL until triggering OnUserConnect, so some module events don't spew out stuff
         * for a user that doesn't exist yet.
@@ -830,6 +836,8 @@ void LocalUser::FullConnect()
                this->GetServerPort(), this->nick.c_str(), this->ident.c_str(), this->host.c_str(), this->GetIPString(), this->fullname.c_str());
        ServerInstance->Logs->Log("BANCACHE", DEBUG, "BanCache: Adding NEGATIVE hit for %s", this->GetIPString());
        ServerInstance->BanCache->AddHit(this->GetIPString(), "", "");
+       // reset the flood penalty (which could have been raised due to things like auto +x)
+       CommandFloodPenalty = 0;
 }
 
 void User::InvalidateCache()
@@ -1020,7 +1028,7 @@ void LocalUser::Write(const std::string& text)
                return;
        }
 
-       ServerInstance->Logs->Log("USEROUTPUT", DEBUG,"C[%s] O %s", uuid.c_str(), text.c_str());
+       ServerInstance->Logs->Log("USEROUTPUT", RAWIO, "C[%s] O %s", uuid.c_str(), text.c_str());
 
        eh.AddWriteBuf(text);
        eh.AddWriteBuf(wide_newline);
@@ -1393,7 +1401,9 @@ void User::DoHostCycle(const std::string &quitline)
                {
                        for(unsigned int i=0; i < memb->modes.length(); i++)
                                modeline.append(" ").append(nick);
-                       snprintf(buffer, MAXBUF, ":%s MODE %s +%s", GetFullHost().c_str(), c->name.c_str(), modeline.c_str());
+                       snprintf(buffer, MAXBUF, ":%s MODE %s +%s",
+                               ServerInstance->Config->CycleHostsFromUser ? GetFullHost().c_str() : ServerInstance->Config->ServerName.c_str(),
+                               c->name.c_str(), modeline.c_str());
                        modeline = buffer;
                }
 
@@ -1620,9 +1630,9 @@ void LocalUser::SetClass(const std::string &explicit_name)
                                        continue;
                        }
 
-                       if (!c->config->getString("pass").empty())
+                       if (regdone && !c->config->getString("password").empty())
                        {
-                               if (ServerInstance->PassCompare(this, c->config->getString("pass"), password, c->config->getString("hash")))
+                               if (ServerInstance->PassCompare(this, c->config->getString("password"), password, c->config->getString("hash")))
                                {
                                        ServerInstance->Logs->Log("CONNECTCLASS", DEBUG, "Bad password, skipping");
                                        continue;