From 57e51adaf1b1e30b06bebf5fe8fb13e937e96c5e Mon Sep 17 00:00:00 2001 From: danieldg Date: Fri, 15 Jan 2010 20:31:35 +0000 Subject: 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 --- src/modules/m_silence.cpp | 9 ++++++--- src/modules/m_spanningtree/capab.cpp | 2 ++ src/modules/m_spanningtree/compat.cpp | 2 ++ src/modules/m_watch.cpp | 7 +++++-- 4 files changed, 15 insertions(+), 5 deletions(-) (limited to 'src/modules') 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 = " {[+|-] }"; - 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& parameters, User *user) @@ -85,7 +85,10 @@ class CommandSVSSilence : public Command RouteDescriptor GetRouting(User* user, const std::vector& 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); } }; diff --git a/src/modules/m_spanningtree/capab.cpp b/src/modules/m_spanningtree/capab.cpp index e5d63ab22..7ebee4bda 100644 --- a/src/modules/m_spanningtree/capab.cpp +++ b/src/modules/m_spanningtree/capab.cpp @@ -61,6 +61,8 @@ static std::string BuildModeList(ModeType type) line.push_back(','); line.append(mh->name); line.push_back('='); + if (mh->GetPrefix()) + line.push_back(mh->GetPrefix()); line.push_back(c); } } diff --git a/src/modules/m_spanningtree/compat.cpp b/src/modules/m_spanningtree/compat.cpp index fe262134f..a11db8215 100644 --- a/src/modules/m_spanningtree/compat.cpp +++ b/src/modules/m_spanningtree/compat.cpp @@ -62,9 +62,11 @@ static const char* const forge_common_1201[] = { "m_saquit.so", "m_servprotect.so", "m_setident.so", + "m_silence.so", "m_sslmodes.so", "m_stripcolor.so", "m_swhois.so", + "m_watch.so" }; static std::string wide_newline("\r\n"); diff --git a/src/modules/m_watch.cpp b/src/modules/m_watch.cpp index 1ac93bb00..78da2799b 100644 --- a/src/modules/m_watch.cpp +++ b/src/modules/m_watch.cpp @@ -128,7 +128,10 @@ class CommandSVSWatch : public Command RouteDescriptor GetRouting(User* user, const std::vector& parameters) { - return ROUTE_BROADCAST; + User* target = ServerInstance->FindNick(parameters[0]); + if (target) + return ROUTE_OPT_UCAST(target->server); + return ROUTE_LOCALONLY; } }; @@ -528,7 +531,7 @@ class Modulewatch : public Module virtual Version GetVersion() { - return Version("Provides support for the /WATCH command", VF_COMMON | VF_VENDOR); + return Version("Provides support for the /WATCH command", VF_OPTCOMMON | VF_VENDOR); } }; -- cgit v1.2.3