]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/treesocket2.cpp
Hide remote oper up notices if quiet bursts are enabled etc. Adapted from avenger...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / treesocket2.cpp
index 48960b89b4c89c4cf2931daafb87c638fc1d91e1..9a8d11710cbb7623d3016ec4b8a0daf0db9195ff 100644 (file)
@@ -245,7 +245,28 @@ bool TreeSocket::OperType(const std::string &prefix, std::deque<std::string> &pa
                this->Instance->all_opers.push_back(u);
                strlcpy(u->oper,opertype.c_str(),NICKMAX-1);
                Utils->DoOneToAllButSender(u->nick,"OPERTYPE",params,u->server);
-               this->Instance->SNO->WriteToSnoMask('o',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server, u->nick,u->ident,u->host,irc::Spacify(opertype.c_str()));
+
+               TreeServer* remoteserver=Utils->FindServer(u->server);
+               bool dosend = true;
+
+               if (this->Utils->quiet_bursts)
+               {
+                       /*
+                        * If quiet bursts are enabled, and server is bursting or silent uline (i.e. services),
+                        * then do nothing. -- w00t
+                        */
+                       if (
+                               this->bursting ||
+                               Utils->FindRemoteBurstServer(remoteserver) ||
+                               this->Instance->SilentULine(this->Instance->FindServerNamePtr(u->server)
+                          )
+                       {
+                               dosend = false;
+                       }
+               }
+
+               if (dosend)
+                       this->Instance->SNO->WriteToSnoMask('o',"From %s: User %s (%s@%s) is now an IRC operator of type %s",u->server, u->nick,u->ident,u->host,irc::Spacify(opertype.c_str()));
        }
        return true;
 }