diff options
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/cmd_notice.cpp | 9 | ||||
-rw-r--r-- | src/commands/cmd_privmsg.cpp | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/commands/cmd_notice.cpp b/src/commands/cmd_notice.cpp index a14473643..41dbe5b3b 100644 --- a/src/commands/cmd_notice.cpp +++ b/src/commands/cmd_notice.cpp @@ -30,6 +30,15 @@ class CommandNotice : 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) + { + if (IS_LOCAL(user)) + // This is handled by the OnUserNotice hook to split the LoopCall pieces + return ROUTE_LOCALONLY; + else + return ROUTE_MESSAGE(parameters[0]); + } }; diff --git a/src/commands/cmd_privmsg.cpp b/src/commands/cmd_privmsg.cpp index 0eacfd0bc..868a5864b 100644 --- a/src/commands/cmd_privmsg.cpp +++ b/src/commands/cmd_privmsg.cpp @@ -31,6 +31,15 @@ class CommandPrivmsg : 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) + { + if (IS_LOCAL(user)) + // This is handled by the OnUserMessage hook to split the LoopCall pieces + return ROUTE_LOCALONLY; + else + return ROUTE_MESSAGE(parameters[0]); + } }; CmdResult CommandPrivmsg::Handle (const std::vector<std::string>& parameters, User *user) |