]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_saquit.cpp
Unite SSL service providers and SSL profile classes
[user/henk/code/inspircd.git] / src / modules / m_saquit.cpp
index ee6de5e946c146ef7b34e356c663abe6dc8639fb..9f700ec5fdc14e8414de77cd25b6f9ff78900bdd 100644 (file)
@@ -28,18 +28,18 @@ class CommandSaquit : public Command
  public:
        CommandSaquit(Module* Creator) : Command(Creator, "SAQUIT", 2, 2)
        {
-               flags_needed = 'o'; Penalty = 0; syntax = "<nick> <reason>";
+               flags_needed = 'o'; syntax = "<nick> <reason>";
                TRANSLATE2(TR_NICK, TR_TEXT);
        }
 
        CmdResult Handle (const std::vector<std::string>& parameters, User *user)
        {
                User* dest = ServerInstance->FindNick(parameters[0]);
-               if ((dest) && (!IS_SERVER(dest)))
+               if ((dest) && (dest->registered == REG_ALL))
                {
                        if (dest->server->IsULine())
                        {
-                               user->WriteNumeric(ERR_NOPRIVILEGES, ":Cannot use an SA command on a u-lined client");
+                               user->WriteNumeric(ERR_NOPRIVILEGES, "Cannot use an SA command on a u-lined client");
                                return CMD_FAILURE;
                        }
 
@@ -61,10 +61,7 @@ class CommandSaquit : public Command
 
        RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
        {
-               User* dest = ServerInstance->FindNick(parameters[0]);
-               if (dest)
-                       return ROUTE_OPT_UCAST(dest->server);
-               return ROUTE_LOCALONLY;
+               return ROUTE_OPT_UCAST(parameters[0]);
        }
 };
 
@@ -84,4 +81,3 @@ class ModuleSaquit : public Module
 };
 
 MODULE_INIT(ModuleSaquit)
-