summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-15 20:31:35 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-01-15 20:31:35 +0000
commit57e51adaf1b1e30b06bebf5fe8fb13e937e96c5e (patch)
treedbc578c1e6df8683736891283326303e47fddecf
parentf8ccaed31d68661d16eae1a412b337af09de111b (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
-rw-r--r--src/modules/m_silence.cpp9
-rw-r--r--src/modules/m_spanningtree/capab.cpp2
-rw-r--r--src/modules/m_spanningtree/compat.cpp2
-rw-r--r--src/modules/m_watch.cpp7
4 files changed, 15 insertions, 5 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);
}
};
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<std::string>& 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);
}
};