diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-09 16:18:33 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-09 16:18:33 +0000 |
commit | 4e906ee56e8a799f5483703f29ac2c7e8fa0909a (patch) | |
tree | 07296033dc1f48c664593e00b43f69fe23e70d9f /src/modules | |
parent | f2ce65bd86b0b48fa4abe958f6190bb7be862dce (diff) |
Fixed idle. again.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2296 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
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<std::string> 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<std::string> par; + par.push_back(x->nick); + par.push_back(signon); + par.push_back(idle); + DoOneToMany(params[0],"IDLE",par); + } } else { |