diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-01 21:41:52 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-10-01 21:41:52 +0000 |
commit | 75d9c67804196c2e4059f3ff89f2ed5ee79a175f (patch) | |
tree | e5275c998f06bbe13e198c7a42b2cfc917be5e4f /src/commands/cmd_privmsg.cpp | |
parent | 6e6846b68a28d858275702e6662e79328e62c60e (diff) |
Add ROUTE_TYPE_MESSAGE and use for PRIVMSG/NOTICE routing
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11791 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_privmsg.cpp')
-rw-r--r-- | src/commands/cmd_privmsg.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
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) |