summaryrefslogtreecommitdiff
path: root/src/modules/m_spanningtree/whois.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-30 18:02:25 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-30 18:02:25 +0000
commit845135ba55d2bad81588a80546c8abe2b76ed47c (patch)
tree5e601147c593b52409403b4ffafa4c222e174291 /src/modules/m_spanningtree/whois.cpp
parent846e00a215026e4b3c0fefd6442e38f86a928e87 (diff)
Remove a few needless string crops, compile fix
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12329 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree/whois.cpp')
-rw-r--r--src/modules/m_spanningtree/whois.cpp11
1 files changed, 3 insertions, 8 deletions
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 &params)
{
if (params.size() < 1)
@@ -36,14 +34,11 @@ bool TreeSocket::Whois(const std::string &prefix, parameterlist &params)
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);
}