X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fwhois.cpp;h=03fb5f9234e627c76065540ca0cd032b32b2e7dd;hb=de69e28a4a1aea89e410b693bbbb67890ecb0bd3;hp=155b0e83813280605beeed4e1f2e0922b229e813;hpb=4798f98adad084cf9e207cc7b32d7e4370e9cc90;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/whois.cpp b/src/modules/m_spanningtree/whois.cpp index 155b0e838..03fb5f923 100644 --- a/src/modules/m_spanningtree/whois.cpp +++ b/src/modules/m_spanningtree/whois.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -12,42 +12,35 @@ */ #include "inspircd.h" -#include "commands/cmd_whois.h" -#include "commands/cmd_stats.h" #include "socket.h" -#include "wildcard.h" #include "xline.h" -#include "transport.h" #include "socketengine.h" -#include "m_spanningtree/main.h" -#include "m_spanningtree/utils.h" -#include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" -#include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" +#include "main.h" +#include "utils.h" +#include "treeserver.h" +#include "treesocket.h" -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/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, std::deque ¶ms) +bool TreeSocket::Whois(const std::string &prefix, parameterlist ¶ms) { if (params.size() < 1) return true; - User* u = this->Instance->FindNick(prefix); + User* u = ServerInstance->FindNick(prefix); if (u) { // an incoming request if (params.size() == 1) { - User* x = this->Instance->FindNick(params[0]); + 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((x->idle_lastmsg) - Instance->Time(true))); - std::deque par; + snprintf(idle, MAXBUF, "%lu", (unsigned long)abs((long)((x->idle_lastmsg) - ServerInstance->Time()))); + parameterlist par; par.push_back(prefix); par.push_back(signon); par.push_back(idle); @@ -64,7 +57,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque ¶m else if (params.size() == 3) { std::string who_did_the_whois = params[0]; - User* who_to_send_to = this->Instance->FindNick(who_did_the_whois); + User* who_to_send_to = ServerInstance->FindNick(who_did_the_whois); if ((who_to_send_to) && (IS_LOCAL(who_to_send_to))) { // an incoming reply to a whois we sent out @@ -73,7 +66,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque ¶m unsigned long idle = atoi(params[2].c_str()); if ((who_to_send_to) && (IS_LOCAL(who_to_send_to))) { - do_whois(this->Instance, who_to_send_to, u, signon, idle, nick_whoised.c_str()); + ServerInstance->DoWhois(who_to_send_to, u, signon, idle, nick_whoised.c_str()); } } else @@ -87,3 +80,4 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque ¶m return true; } +