diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-26 21:13:14 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-26 21:13:14 +0000 |
commit | 035c7089ccc9973ad52aa284b972e6c65cc1bab7 (patch) | |
tree | f382a926a7e8fdb33368de540e90047bd4c9cbc7 /src/modules/m_spanningtree | |
parent | 644c5992ca253cc90783ac1454abd1d866632cfd (diff) |
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
Diffstat (limited to 'src/modules/m_spanningtree')
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
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<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; } |