diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-15 20:31:35 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2010-01-15 20:31:35 +0000 |
commit | 57e51adaf1b1e30b06bebf5fe8fb13e937e96c5e (patch) | |
tree | dbc578c1e6df8683736891283326303e47fddecf /src/modules/m_silence.cpp | |
parent | f8ccaed31d68661d16eae1a412b337af09de111b (diff) |
Route SVSSILENCE/SVSWATCH using OPT_UCAST, marking them OPTCOMMON
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12264 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_silence.cpp')
-rw-r--r-- | src/modules/m_silence.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/modules/m_silence.cpp b/src/modules/m_silence.cpp index cbaab2547..8c26051db 100644 --- a/src/modules/m_silence.cpp +++ b/src/modules/m_silence.cpp @@ -56,7 +56,7 @@ class CommandSVSSilence : public Command CommandSVSSilence(Module* Creator) : Command(Creator,"SVSSILENCE", 2) { syntax = "<target> {[+|-]<mask> <p|c|i|n|t|a|x>}"; - TRANSLATE3(TR_NICK, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */ + TRANSLATE4(TR_NICK, TR_TEXT, TR_TEXT, TR_END); /* we watch for a nick. not a UID. */ } CmdResult Handle (const std::vector<std::string>& parameters, User *user) @@ -85,7 +85,10 @@ class CommandSVSSilence : public Command RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters) { - return ROUTE_BROADCAST; + User* target = ServerInstance->FindNick(parameters[0]); + if (target) + return ROUTE_OPT_UCAST(target->server); + return ROUTE_LOCALONLY; } }; @@ -368,7 +371,7 @@ class ModuleSilence : public Module Version GetVersion() { - return Version("Provides support for the /SILENCE command", VF_COMMON | VF_VENDOR); + return Version("Provides support for the /SILENCE command", VF_OPTCOMMON | VF_VENDOR); } }; |