Page 7 of 10

Re: Master server shutting down on Jan 24th

Posted: Sun Jan 08, 2023 11:57 pm
by captainsnarf
I was holding out on making a mutator myself. i didn't want to steal concord's thunder! :) I'll try making one that simply changes the value without any prompts, spectate mode, or other stuff.

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 9:02 am
by pooty
Yeah its not like there's any reason or value to keep the old master servers anyway after the 24th.

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 9:48 am
by captainsnarf
Download here! SimpleServerSwitcher.zip

It could be simplified (I was trying stuff) but seems to work ok

Code: Select all


class MutSimpleServerSwitcher extends Mutator;

var bool bSwitched;

replication
{
    reliable if(Role == ROLE_Authority)
        ClientUpdateToGameSpy;
}

simulated function bool IsUpdatedToGameSpy()
{
    return class'IpDrv.MasterServerLink'.default.MasterServerList.Length == 1 &&
    class'IpDrv.MasterServerLink'.default.MasterServerList[0].Address == "utmaster.openspy.net";
}

simulated function UpdateToGameSpy()
{
    class'IpDrv.MasterServerLink'.default.MasterServerList.Length = 1;
    class'IpDrv.MasterServerLink'.default.MasterServerList[0].Address = "utmaster.openspy.net";
    class'IpDrv.MasterServerLink'.default.MasterServerList[0].Port = 28902;
    class'IpDrv.MasterServerLink'.static.StaticSaveConfig();
}

simulated function ClientUpdateToGameSpy()
{
    if(Role == ROLE_Authority)
        return;

    if(!IsUpdatedToGameSpy())
        UpdateToGameSpy();
}

simulated function Tick(float DT)
{
    super.Tick(DT);
    if(Role < ROLE_Authority && !bSwitched)
    {
        ClientUpdateToGameSpy();
        Disable('Tick');
        bSwitched=true;
    }
}

defaultproperties
{
    FriendlyName="Simple Server Switcher"
    Description="Simple Server Switcher changes the players master server configuration from Epic to OpenSpy"
    RemoteRole=ROLE_SimulatedProxy
    bNetTemporary=true
    bAlwaysRelevant=true
    bAddToServerPackages=True
    bSwitched=False
}

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 10:19 am
by pooty
Do we want to display a screen message?

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 10:52 am
by captainsnarf
pooty wrote: Mon Jan 09, 2023 10:19 am Do we want to display a screen message?
That's probably a good idea. I noticed we have a new server message already that says something like 'be sure to change your master server list! check forum!' We could update it to instead say 'your master server has been switched to OpenSpy. check forum!'

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 11:49 am
by pooty
Yeah that works. If they don't bother to read, they probably won't bother to change it and then wonder why they can't see the server... ;)

I'll update the server with it later today.

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 1:46 pm
by Enyo
pooty wrote: Mon Jan 09, 2023 11:49 am Yeah that works. If they don't bother to read, they probably won't bother to change it and then wonder why they can't see the server... ;)

I'll update the server with it later today.
With snarf's server switcher mod, could you make it required to change their master server to OpenSpy before they're allowed to join the game? Force them to click the button before it let's them join? Seems like that would be the easiest solution to make sure everyone switches.

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 1:54 pm
by captainsnarf
There is nothing to click. When they join our server, their master gets switched. We don't ask :twisted: :D

Re: Master server shutting down on Jan 24th

Posted: Mon Jan 09, 2023 1:55 pm
by Enyo
captainsnarf wrote: Mon Jan 09, 2023 1:54 pm There is nothing to click. When they join our server, their master gets switched. We don't ask :twisted: :D
Even better! What they don't know doesn't hurt them.

Re: Master server shutting down on Jan 24th

Posted: Wed Jan 11, 2023 11:39 am
by pooty
Its active on the server. I think it was active yesterday (after a crash) since I changed the command line but didn't restart since folks were on.