]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_sajoin.cpp
Make User::WriteRemoteNumeric() virtual, implement it in SpanningTree::RemoteUser
[user/henk/code/inspircd.git] / src / modules / m_sajoin.cpp
index d1321947b2bb54979ecf8618a19556ae05581321..9d87360ece4f080f672c1210a072d1909c8f8cc7 100644 (file)
@@ -53,7 +53,7 @@ class CommandSajoin : public Command
 
                        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;
                        }
                        if (IS_LOCAL(user) && !ServerInstance->IsChannel(channel))
@@ -66,7 +66,7 @@ class CommandSajoin : public Command
                        Channel* chan = ServerInstance->FindChan(channel);
                        if ((chan) && (chan->HasUser(dest)))
                        {
-                               user->SendText(":" + user->server->GetName() + " NOTICE " + user->nick + " :*** " + dest->nick + " is already on " + channel);
+                               user->WriteRemoteNotice("*** " + dest->nick + " is already on " + channel);
                                return CMD_FAILURE;
                        }
 
@@ -103,10 +103,7 @@ class CommandSajoin : 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]);
        }
 };