- std::string lastuuid;
- std::string killreason;
-
- public:
- /** Constructor for kill.
- */
- CommandKill ( Module* parent) : Command(parent,"KILL",2,2) {
- flags_needed = 'o';
- syntax = "<nickname> <reason>";
- TRANSLATE2(TR_CUSTOM, TR_CUSTOM);
- }
- /** Handle command.
- * @param parameters The parameters to the command
- * @param user The user issuing the 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)
- {
- // FindNick() doesn't work here because we quit the target user in Handle() which
- // removes it from the nicklist, so we check lastuuid: if it's empty then this KILL
- // was for a local user, otherwise it contains the uuid of the user who was killed.
- if (lastuuid.empty())
- return ROUTE_LOCALONLY;
- return ROUTE_BROADCAST;
- }
+ flags_needed = 'o';
+ syntax = "<nickname> <reason>";
+ TRANSLATE2(TR_CUSTOM, TR_CUSTOM);
+}