From 063255dd3cc046c00e961e2506082222a0e3e7cc Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 8 Dec 2005 21:18:53 +0000 Subject: Added code to prevent sending of FMODE and FHOST before connect is complete (done usually by m_cloaking) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2283 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 6b4791894..edc5fa16e 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -2524,6 +2524,8 @@ class ModuleSpanningTree : public Module virtual void OnChangeHost(userrec* user, std::string newhost) { // only occurs for local clients + if (user->registered != 7) + return; std::deque params; params.push_back(newhost); DoOneToMany(user->nick,"FHOST",params); @@ -2532,6 +2534,8 @@ class ModuleSpanningTree : public Module virtual void OnChangeName(userrec* user, std::string gecos) { // only occurs for local clients + if (user->registered != 7) + return; std::deque params; params.push_back(gecos); DoOneToMany(user->nick,"FNAME",params); @@ -2568,7 +2572,7 @@ class ModuleSpanningTree : public Module virtual void OnUserQuit(userrec* user, std::string reason) { - if (std::string(user->server) == Srv->GetServerName()) + if ((std::string(user->server) == Srv->GetServerName()) && (user->registered == 7)) { std::deque params; params.push_back(":"+reason); @@ -2704,7 +2708,7 @@ class ModuleSpanningTree : public Module virtual void OnMode(userrec* user, void* dest, int target_type, std::string text) { - if (std::string(user->server) == Srv->GetServerName()) + if ((std::string(user->server) == Srv->GetServerName()) && (user->registered == 7)) { if (target_type == TYPE_USER) { -- cgit v1.2.3