diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/uid.cpp | 10 | ||||
-rw-r--r-- | src/modules/m_spanningtree/whois.cpp | 11 |
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 ¶ms, 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 ¶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); } |