]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Hide remote oper up notices if quiet bursts are enabled etc. Adapted from avenger...
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 26 Aug 2007 21:13:14 +0000 (21:13 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sun, 26 Aug 2007 21:13:14 +0000 (21:13 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7840 e03df62e-2008-0410-955e-edbf42e46eb7

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;
 }