ClassiCube / MCGalaxy

A Minecraft Classic / ClassiCube server software
GNU General Public License v3.0
172 stars 80 forks source link

Allow more precise heartbeat configuration #646

Closed forkiesassds closed 2 years ago

forkiesassds commented 2 years ago

Closes #636.

Not sure if you will like certain changes I have done...

UnknownShadow200 commented 2 years ago

Unfortunately all those changes relating to ClassiCubeAccountPlus / RemoveLastPlus break backwards compatibility, and I cannot merge changes like that

forkiesassds commented 2 years ago

I've reverted some of the changes that have comments mentioning stuff related with backwards compatibility. Let me know if I missed any.

forkiesassds commented 2 years ago

Are there still any possible backwards compatibility problems?

UnknownShadow200 commented 2 years ago

The remaining changes to ClassiCubeAccountPlus related code and removal of RemoveLastPlus() are still breaking changes

I'm also not a huge fan of how the heartbeat parameters list is written to/loaded from disc now, because that has the potential to make things more difficult in the future if I decide to change the default heartbeat parameters

I've thought about an alternative approach, so I'll try to find some time to work on that over this weekend

UnknownShadow200 commented 2 years ago

What's the use case for being able to override every heartbeat parameter?

forkiesassds commented 2 years ago

I made this pull request to solve a problem with overlapping usernames, not to allow overriding of every heartbeat parameter

UnknownShadow200 commented 2 years ago

What were all the changes to heartbeat to use "%port" etc for then?

forkiesassds commented 2 years ago

What were all the changes to heartbeat to use "%port" etc for then?

It's so you can reconfigure the heartbeat, %port is a placeholder, and it gets replaced with the actual port.

UnknownShadow200 commented 2 years ago

Right. But my question is more what has reconfiguring the heartbeat got to do with adjusting usernames

MisterSheeple commented 2 years ago

Players from Betacraft might have the same username as someone else on ClassiCube, so this could allow user data to get messy. So the idea is that each heartbeat could have a different prefix or suffix to separate user data, if needed. Otherwise, this would cause issues with people being able to impersonate other players.

UnknownShadow200 commented 2 years ago

I just mean reconfiguring the arguments sent in the heartbeat request / data.HeartbeatArguments