1. Has anyone done this yet?
     
  2. Probably get your server blacklisted for redirection.
    But you may be able send a client command
    Code:
    baseplayer.SendCommand('disconnect;connect "127.0.0.1:28015"')
    If that doesn't work then maybe do a bind?
    -Player types command
    -Binds disconnect/reconnect to a key
    -Message player to confirm they want to go to another server by pressing the bind key
    -Profit???
    Code:
    baseplayer.SendCommand('bind KEY disconnect;connect "127.0.0.1:28015"')
    This most likely will not work, But its a start.
     
  3. Wulf

    Wulf Community Admin

    SendCommand doesn't exist in Rust, it'd be SendConsoleCommand. Rust doesn't accept chained commands either directly, so that wouldn't work.
     
  4. Would you think a "server proxy" would get banned? For example player connects to a server that appears to be a rust server but it just proxies the packets from a offline rust server?
     
  5. Wulf

    Wulf Community Admin

    Facepunch blacklists for server redirection and such, so I'd avoid it.
     
  6. Got it working using binds, Shitty way to do it but it works.
    NOTE: This may or may not get your server blacklisted as you have the option to change servers.

    Example in PY, Easy to change to C#.
    Code:
     class TEST:
        def __init__(self):
            self.Title = "TEST"
            self.Author = "Jakkee"
           
        def Init(self):
            command.AddChatCommand("test", self.Plugin, "On_TestCommand")    def On_TestCommand(self, player, cmd, args):
            rust.BroadcastChat("TEST THING", "Press O to transfer servers, Press P to cancel", player.UserIDString)
            player.SendConsoleCommand('bind o "disconnect;connect 127.0.0.1:28015;bind p " ";bind o " ""')
            player.SendConsoleCommand('bind p "chat.add ' + player.UserIDString + ' "You will not transfer servers";bind o " ";bind p " ""')
    save as TEST.py and command is /test
     
  7. Wulf

    Wulf Community Admin

    PS. Your post hit moderation because of the sensitive subject, which is why it wasn't instantly approved. ;)

    Warning to all: tread with causing when attempting to redirect your server, this can be a blacklisting offense with Rust and it can easily be abused with keybinds, especially if no cleared on disconnect.