summaryrefslogtreecommitdiff
path: root/src/modules
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
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')
-rw-r--r--src/modules/m_spanningtree/uid.cpp10
-rw-r--r--src/modules/m_spanningtree/whois.cpp11
2 files changed, 8 insertions, 13 deletions
diff --git a/src/modules/m_spanningtree/uid.cpp b/src/modules/m_spanningtree/uid.cpp
index 8fc423156..5152ef274 100644
--- a/src/modules/m_spanningtree/uid.cpp
+++ b/src/modules/m_spanningtree/uid.cpp
@@ -80,11 +80,11 @@ CmdResult CommandUID::Handle(const parameterlist &params, User* serversrc)
return CMD_INVALID;
}
(*(ServerInstance->Users->clientlist))[nick] = _new;
- _new->nick.assign(nick, 0, MAXBUF);
- _new->host.assign(params[3], 0, 64);
- _new->dhost.assign(params[4], 0, 64);
- _new->ident.assign(params[5], 0, MAXBUF);
- _new->fullname.assign(params[params.size() - 1], 0, MAXBUF);
+ _new->nick = nick;
+ _new->host = params[3];
+ _new->dhost = params[4];
+ _new->ident = params[5];
+ _new->fullname = params[params.size() - 1];
_new->registered = REG_ALL;
_new->signon = signon;
_new->age = age_t;
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);
}