+class CommandSVSSilence : public Command
+{
+ public:
+ CommandSVSSilence(Module* Creator) : Command(Creator,"SVSSILENCE", 2)
+ {
+ syntax = "<target> {[+|-]<mask> <p|c|i|n|t|a|x>}";
+ 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)
+ {
+ /*
+ * XXX: thought occurs to me
+ * We may want to change the syntax of this command to
+ * SVSSILENCE <flagsora+> +<nick> -<nick> +<nick>
+ * style command so services can modify lots of entries at once.
+ * leaving it backwards compatible for now as it's late. -- w
+ */
+ if (!ServerInstance->ULine(user->server))
+ return CMD_FAILURE;
+
+ User *u = ServerInstance->FindNick(parameters[0]);
+ if (!u)
+ return CMD_FAILURE;
+
+ if (IS_LOCAL(u))
+ {
+ ServerInstance->Parser->CallHandler("SILENCE", std::vector<std::string>(++parameters.begin(), parameters.end()), u);
+ }
+
+ return CMD_SUCCESS;
+ }
+
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
+ {
+ User* target = ServerInstance->FindNick(parameters[0]);
+ if (target)
+ return ROUTE_OPT_UCAST(target->server);
+ return ROUTE_LOCALONLY;
+ }
+};
+