From f3abcc8befc200b906aa835d76435856eb3c8645 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 25 Jul 2006 10:35:40 +0000 Subject: Prevent notice loops on servermasks git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4541 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 8901c4353..44ee04bfd 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -3489,11 +3489,14 @@ class ModuleSpanningTree : public Module } else if (target_type == TYPE_SERVER) { - char* target = (char*)dest; - std::deque par; - par.push_back(target); - par.push_back(":"+text); - DoOneToMany(user->nick,"NOTICE",par); + if (user->fd > -1) + { + char* target = (char*)dest; + std::deque par; + par.push_back(target); + par.push_back(":"+text); + DoOneToMany(user->nick,"NOTICE",par); + } } } @@ -3534,11 +3537,14 @@ class ModuleSpanningTree : public Module } else if (target_type == TYPE_SERVER) { - char* target = (char*)dest; - std::deque par; - par.push_back(target); - par.push_back(":"+text); - DoOneToMany(user->nick,"PRIVMSG",par); + if (user->fd > -1) + { + char* target = (char*)dest; + std::deque par; + par.push_back(target); + par.push_back(":"+text); + DoOneToMany(user->nick,"PRIVMSG",par); + } } } -- cgit v1.2.3