X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmain.cpp;h=8c04d6c909797cacebf09dbcbdb7c34d6ee7bd51;hb=d736eba00b274c87662bd73a3acf8288135643d6;hp=39ff222c52a39eacaf2e7a7e87e079a8ec6e05c5;hpb=ba0802d8a8b173a559f149fefe9cd2b52a962c84;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 39ff222c5..8c04d6c90 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -63,6 +63,7 @@ void ModuleSpanningTree::init() delete ServerInstance->PI; ServerInstance->PI = new SpanningTreeProtocolInterface; loopCall = false; + SplitInProgress = false; // update our local user count Utils->TreeRoot->UserCount = ServerInstance->Users->local_users.size(); @@ -547,13 +548,25 @@ void ModuleSpanningTree::OnUserPart(Membership* memb, std::string &partmessage, void ModuleSpanningTree::OnUserQuit(User* user, const std::string &reason, const std::string &oper_message) { - if ((IS_LOCAL(user)) && (user->registered == REG_ALL)) + if (IS_LOCAL(user)) { if (oper_message != reason) ServerInstance->PI->SendMetaData(user, "operquit", oper_message); CmdBuilder(user, "QUIT").push_last(reason).Broadcast(); } + else + { + // Hide the message if one of the following is true: + // - User is being quit due to a netsplit and quietbursts is on + // - Server is a silent uline + bool hide = (((this->SplitInProgress) && (Utils->quiet_bursts)) || (ServerInstance->SilentULine(user->server))); + if (!hide) + { + ServerInstance->SNO->WriteToSnoMask('Q', "Client exiting on server %s: %s (%s) [%s]", + user->server.c_str(), user->GetFullRealHost().c_str(), user->GetIPString().c_str(), oper_message.c_str()); + } + } // Regardless, We need to modify the user Counts.. TreeServer* SourceServer = Utils->FindServer(user->server); @@ -631,7 +644,7 @@ void ModuleSpanningTree::ReadConfig(ConfigStatus& status) msg.append(e.GetReason()); ServerInstance->SNO->WriteToSnoMask('l', msg); if (status.srcuser && !IS_LOCAL(status.srcuser)) - ServerInstance->PI->SendSNONotice("L", msg); + ServerInstance->PI->SendSNONotice('L', msg); } }