]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_kill.cpp
Merge pull request #16 from Adam-/insp20
[user/henk/code/inspircd.git] / src / commands / cmd_kill.cpp
index e7a80400af9834e5170b4958c2c990efd43ea734..3490199c8b800ffb60d1797c84aab334fcd196dc 100644 (file)
@@ -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