]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/whois.cpp
Replace std::deque with std::vector in spanningtree and related modules
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / whois.cpp
index b38f25a3820d6a30335eb60e5a454f71fb2256d1..7967131826a9db98f9f9667183d57054515db0ae 100644 (file)
@@ -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.
 #include "commands/cmd_stats.h"
 #include "socket.h"
 #include "xline.h"
-#include "transport.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/treesocket.h"
+#include "main.h"
+#include "utils.h"
+#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, std::deque<std::string> &params)
+bool TreeSocket::Whois(const std::string &prefix, parameterlist &params)
 {
        if (params.size() < 1)
                return true;
-       User* u = this->Instance->FindNick(prefix);
+       User* u = this->ServerInstance->FindNick(prefix);
        if (u)
        {
                // an incoming request
                if (params.size() == 1)
                {
-                       User* x = this->Instance->FindNick(params[0]);
+                       User* x = this->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) - Instance->Time())));
-                               std::deque<std::string> 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);
@@ -60,7 +60,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> &param
                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 = this->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
@@ -69,7 +69,7 @@ bool TreeSocket::Whois(const std::string &prefix, std::deque<std::string> &param
                                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());
+                                       do_whois(this->ServerInstance, who_to_send_to, u, signon, idle, nick_whoised.c_str());
                                }
                        }
                        else