From 845135ba55d2bad81588a80546c8abe2b76ed47c Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 30 Jan 2010 18:02:25 +0000 Subject: Remove a few needless string crops, compile fix git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12329 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/whois.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/modules/m_spanningtree/whois.cpp') diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/whois.cpp index 9be4ef722..59dc83985 100644 --- a/src/modules/m_spanningtree/whois.cpp +++ b/src/modules/m_spanningtree/whois.cpp @@ -21,8 +21,6 @@ #include "treeserver.h" #include "treesocket.h" -/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ - bool TreeSocket::Whois(const std::string &prefix, parameterlist ¶ms) { if (params.size() < 1) @@ -36,14 +34,11 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist ¶ms) User* x = ServerInstance->FindNick(params[0]); if ((x) && (IS_LOCAL(x))) { - char signon[MAXBUF]; - char idle[MAXBUF]; - snprintf(signon, MAXBUF, "%lu", (unsigned long)x->signon); - snprintf(idle, MAXBUF, "%lu", (unsigned long)abs((long)((x->idle_lastmsg) - ServerInstance->Time()))); + long idle = abs((long)((x->idle_lastmsg) - ServerInstance->Time())); parameterlist par; par.push_back(prefix); - par.push_back(signon); - par.push_back(idle); + par.push_back(ConvToStr(x->signon)); + par.push_back(ConvToStr(idle)); // ours, we're done, pass it BACK Utils->DoOneToOne(params[0], "IDLE", par, u->server); } -- cgit v1.2.3