Page 1 of 1
Disabling connection to different zones by the same user.
Posted: 12 Apr 2011, 15:00
by yuvallahav
I've just noticed for the first time after about a year of working with the smartfoxserver pro that users can log in to different zones using the same user name, something that was not possible on the basic server... can this be avoided???
Thanks.
Yuval Lahav.
Posted: 12 Apr 2011, 22:30
by Sarevok
How do you handle user log in? Do you check their username/password match the one in the database for example? If you do, then you can have different databases (with username/pass information) for each zone. That way zones will be totally independent.
Posted: 13 Apr 2011, 05:09
by BigFIsh
Could it be due to both zones using the same database?
Posted: 13 Apr 2011, 07:56
by yuvallahav
Well, all zone use the same users database (the site's database), but different score and history databases, but doesn't the login process to the smartfox does a check to see there is no one with the same user name connected to the server like it used to do in the basic server?
In the basic server which we used for all our games (again, each as a zone) before we switched to pro, a user would receive an error message on login when trying to login with a name already logged on to the server (not zone, but the whole server), while with the pro version, a user can connect and login to different zones on the server using the same name, it does not generate the error message the basic server does.
And Sarevok, I'm trying to do the exact opposite, I'm trying to prevent users logging into more then one game (zone) at a time with the same user name, it does not give us any technical problems, we just don't want users playing more then one game at a time with a specific user name.
Posted: 15 Apr 2011, 09:10
by Lapo
I've just noticed for the first time after about a year of working with the smartfoxserver pro that users can log in to different zones using the same user name, something that was not possible on the basic server... can this be avoided???
The Zone architecture is the same in SFS PRO and Basic in this regards.
Zones are separate applications running in the Server, so user Lapo can exist in both Zone A and Zone B.
There is no way to stop this from configuration, however you could set a simple flag on your DB to make sure that a certain User does not login in more than one Zone at the same time.
Posted: 15 Apr 2011, 09:12
by yuvallahav
Yep, thought so... anyway, I'm working on some changes to the DB and our extensions like you have recommended yesterday to Riccardo, I hope this will do the trick.
Thanks again.
Yuval.