From a7dcd04c5555826bc0597f997a508b5d5b9eaf2b Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Dec 2005 16:54:23 +0000 Subject: Fixes to IDLE git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2298 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 9638df1b2..e067bcdfd 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1380,7 +1380,7 @@ class TreeSocket : public InspSocket log(DEBUG,"Got IDLE, sending back IDLE"); char signon[MAXBUF]; char idle[MAXBUF]; - if (x) + if ((x) && (std::string(x->server) == Srv->GetServerName())) { snprintf(signon,MAXBUF,"%lu",(unsigned long)x->signon); snprintf(idle,MAXBUF,"%lu",(unsigned long)abs((x->idle_lastmsg)-time(NULL))); @@ -1388,12 +1388,17 @@ class TreeSocket : public InspSocket par.push_back(prefix); par.push_back(signon); par.push_back(idle); - DoOneToMany(params[0],"IDLE",par); + DoOneToOne(params[0],"IDLE",par,u->server); + } + else + { + // not for us, pass it on + DoOneToOne(prefix,"IDLE",params,u->server); } } else { - DoOneToAllButSender(prefix,"IDLE",params,u->server); + DoOneToOne(prefix,"IDLE",params,u->server); } } else if (params.size() == 3) @@ -1412,7 +1417,7 @@ class TreeSocket : public InspSocket } else { - DoOneToAllButSender(prefix,"IDLE",params,u->server); + DoOneToOne(prefix,"IDLE",params,u->server); } } } @@ -2285,7 +2290,7 @@ class ModuleSpanningTree : public Module { std::deque params; params.push_back(parameters[1]); - DoOneToMany(user->nick,"IDLE",params); + DoOneToOne(user->nick,"IDLE",params,remote->server); return 1; } else if (!remote) -- cgit v1.2.3