Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The YOG metaserver has refused connection because your Globulation 2 client is out of date. #116

Closed
seasquirt opened this issue Apr 13, 2024 · 3 comments · Fixed by #117
Closed

Comments

@seasquirt
Copy link

Happens on latest version from the website on windows.

@stephanemagnenat
Copy link
Contributor

stephanemagnenat commented Apr 14, 2024

@progval do you think it could be due to the recent recompilation of the server (see #113)? If so, I'm not 100% sure which commit made that incompatible, probably 9958011, which bumped network protocol for games, and so it could be that the game protocol version is also the one considered for the meta server, although the two are in principle decoupled and I'm vaguely surprised if they would be coupled, but I cannot rule that out and I do not have time right now to investigate that question.

@progval
Copy link
Contributor

progval commented Apr 14, 2024

Restarted with:

diff --git a/src/YOGServer.cpp b/src/YOGServer.cpp
index ba8fea96..e7457e8e 100644
--- a/src/YOGServer.cpp
+++ b/src/YOGServer.cpp
@@ -181,7 +181,7 @@ YOGGamePolicy YOGServer::getGamePolicy() const
 
 YOGLoginState YOGServer::verifyLoginInformation(const std::string& username, const std::string& password, const std::string& ip, Uint16 version)
 {
-       if(version < NET_PROTOCOL_VERSION)
+       if(version < NET_PROTOCOL_VERSION - 1)
                return YOGClientVersionTooOld;
        if(loginPolicy == YOGAnonymousLogin)
                return YOGLoginSuccessful;
@@ -215,7 +215,7 @@ YOGLoginState YOGServer::verifyLoginInformation(const std::string& username, con
 
 YOGLoginState YOGServer::registerInformation(const std::string& username, const std::string& password, const std::string& ip, Uint16 version)
 {
-       if(version < NET_PROTOCOL_VERSION)
+       if(version < NET_PROTOCOL_VERSION - 1)
                return YOGClientVersionTooOld;
        if(loginPolicy == YOGAnonymousLogin)
                return YOGLoginSuccessful;

@stephanemagnenat
Copy link
Contributor

Thank you @progval for the quick reaction! One question: why not using a fixed NET_PROTOCOL_VERSION here (in that case 27)?

I think that in the future we should decouple the meta-server version from the version for playing games over network. I created the issue #118 for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants