From c0d98b4cda769d88281115ed5672cc6415ec350d Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Feb 2006 18:20:40 +0000 Subject: Newline stripping for asctime() git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3162 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/modules') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 4e45e6dd1..475e75e84 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1727,7 +1727,10 @@ class TreeSocket : public InspSocket time_t rawtime = atol(params[2].c_str()); struct tm * timeinfo; timeinfo = localtime(&rawtime); - WriteServ(u->fd,"391 %s %s :%s",u->nick,prefix.c_str(),asctime(timeinfo)); + char tms[26]; + snprintf(tms,26,"%s",asctime(timeinfo)); + tms[24] = 0; + WriteServ(u->fd,"391 %s %s :%s",u->nick,prefix.c_str(),tms); } else { @@ -2808,6 +2811,10 @@ class ModuleSpanningTree : public Module TreeServer* found = FindServerMask(parameters[0]); if (found) { + // we dont' override for local server + if (found == TreeRoot) + return 0; + std::deque params; params.push_back(found->GetName()); params.push_back(user->nick); -- cgit v1.2.3