summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-11 15:29:38 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-11 15:29:38 +0000
commit62a145ce248b386f6412108ad1b60a2c5bed46c1 (patch)
tree5efa46042d32745a21e67ff0449baa86c13224ca
parentc6a4d51c006566dbbe959f3272c438ab740bac9c (diff)
Fix double-sending of locally sourced kills
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12434 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/commands/cmd_kill.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp
index 17d4c6629..3490199c8 100644
--- a/src/commands/cmd_kill.cpp
+++ b/src/commands/cmd_kill.cpp
@@ -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
@@ -33,6 +37,9 @@ class CommandKill : public Command
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;
}
};