From 035c7089ccc9973ad52aa284b972e6c65cc1bab7 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 26 Aug 2007 21:13:14 +0000 Subject: Hide remote oper up notices if quiet bursts are enabled etc. Adapted from avenger's patch. Untested. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7840 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/treesocket2.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index 48960b89b..9a8d11710 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -245,7 +245,28 @@ bool TreeSocket::OperType(const std::string &prefix, std::deque &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; } -- cgit v1.2.3