X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fmain.cpp;h=8c04d6c909797cacebf09dbcbdb7c34d6ee7bd51;hb=d736eba00b274c87662bd73a3acf8288135643d6;hp=8d8a51ede496e1f43f40146884669499ad17ec47;hpb=a500ec70bb82151c8fcf7443b4645640233952e8;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 8d8a51ede..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);