diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-09 16:54:23 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-09 16:54:23 +0000 |
commit | a7dcd04c5555826bc0597f997a508b5d5b9eaf2b (patch) | |
tree | df8d7bd117597658e061ce98e31669a6c1faf7c6 /src/modules | |
parent | a55a1f6b4cb8f7fa42e7499d3afc2d0eefee4d7d (diff) |
Fixes to IDLE
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2298 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 15 |
1 files 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<std::string> params; params.push_back(parameters[1]); - DoOneToMany(user->nick,"IDLE",params); + DoOneToOne(user->nick,"IDLE",params,remote->server); return 1; } else if (!remote) |