]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_kill.cpp
Fix MySQL crash on module unload with empty query queue
[user/henk/code/inspircd.git] / src / commands / cmd_kill.cpp
index 8bbc7ad0bdc11d02b40cad1e0c34e820b3681899..3490199c8b800ffb60d1797c84aab334fcd196dc 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
@@ -23,7 +23,11 @@ class CommandKill : public Command
  public:
        /** Constructor for kill.
         */
-       CommandKill ( Module* parent) : Command(parent,"KILL",2,2) { flags_needed = 'o'; syntax = "<nickname> <reason>"; }
+       CommandKill ( Module* parent) : Command(parent,"KILL",2,2) {
+               flags_needed = 'o';
+               syntax = "<nickname> <reason>";
+               TRANSLATE3(TR_NICK, TR_TEXT, TR_END);
+       }
        /** Handle command.
         * @param parameters The parameters to the comamnd
         * @param pcnt The number of parameters passed to teh command
@@ -31,6 +35,13 @@ class CommandKill : public Command
         * @return A value from CmdResult to indicate command success or failure.
         */
        CmdResult Handle(const std::vector<std::string>& parameters, User *user);
+       RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
+       {
+               // local kills of remote users are routed via the OnRemoteKill hook
+               if (IS_LOCAL(user))
+                       return ROUTE_LOCALONLY;
+               return ROUTE_BROADCAST;
+       }
 };
 
 /** Handle /KILL