]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_spanningtree/rsquit.cpp
Remove VF_COMMON from mode-provider modules (no longer needed due to better CAPAB...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / rsquit.cpp
index e9c69a1d44ab7e7b812f26ead40dc2c6eba2ef9c..39378c31d05a46f98d37d728134303ed02660cc7 100644 (file)
@@ -2,7 +2,7 @@
  *       | Inspire Internet Relay Chat Daemon |
  *       +------------------------------------+
  *
- *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
+ *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
  * See: http://wiki.inspircd.org/Credits
  *
  * This program is free but copyrighted software; see
  */
 
 #include "inspircd.h"
-#include "commands/cmd_whois.h"
-#include "commands/cmd_stats.h"
 #include "socket.h"
 #include "xline.h"
-#include "../transport.h"
 
 #include "main.h"
 #include "utils.h"
 #include "treeserver.h"
 #include "treesocket.h"
-#include "rsquit.h"
+#include "commands.h"
 
-/* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h m_spanningtree/rsquit.h */
-
-CommandRSQuit::CommandRSQuit (InspIRCd* Instance, Module* Creator, SpanningTreeUtilities* Util)
-       : Command(Instance, Creator, "RSQUIT", "o", 1), Utils(Util)
+CommandRSQuit::CommandRSQuit (Module* Creator, SpanningTreeUtilities* Util)
+       : Command(Creator, "RSQUIT", 1), Utils(Util)
 {
+       flags_needed = 'o';
        syntax = "<target-server-mask> [reason]";
 }
 
@@ -63,13 +59,17 @@ CmdResult CommandRSQuit::Handle (const std::vector<std::string>& parameters, Use
                        sock->Squit(server_target, std::string("Server quit by ") + user->GetFullRealHost() + " (" + reason + ")");
                        ServerInstance->SE->DelFd(sock);
                        sock->Close();
-                       return CMD_LOCALONLY;
                }
        }
 
        return CMD_SUCCESS;
 }
 
+RouteDescriptor CommandRSQuit::GetRouting(User* user, const std::vector<std::string>& parameters)
+{
+       return ROUTE_UNICAST(parameters[0]);
+}
+
 // XXX use protocol interface instead of rolling our own :)
 void CommandRSQuit::NoticeUser(User* user, const std::string &msg)
 {