From 4e906ee56e8a799f5483703f29ac2c7e8fa0909a Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 9 Dec 2005 16:18:33 +0000 Subject: Fixed idle. again. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2296 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 1ca48aece..feeab0b70 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1380,13 +1380,16 @@ class TreeSocket : public InspSocket log(DEBUG,"Got IDLE, sending back IDLE"); char signon[MAXBUF]; char idle[MAXBUF]; - snprintf(signon,MAXBUF,"%lu",(unsigned long)x->signon); - snprintf(idle,MAXBUF,"%lu",(unsigned long)abs((x->idle_lastmsg)-time(NULL))); - std::deque par; - par.push_back(x->nick); - par.push_back(signon); - par.push_back(idle); - DoOneToMany(params[0],"IDLE",par); + if (x) + { + snprintf(signon,MAXBUF,"%lu",(unsigned long)x->signon); + snprintf(idle,MAXBUF,"%lu",(unsigned long)abs((x->idle_lastmsg)-time(NULL))); + std::deque par; + par.push_back(x->nick); + par.push_back(signon); + par.push_back(idle); + DoOneToMany(params[0],"IDLE",par); + } } else { -- cgit v1.2.3