RoomList to Guests

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
yaswanth
Posts: 32
Joined: 27 Sep 2008, 21:02

RoomList to Guests

Post by yaswanth »

Hi,

Is there way to show the room lists to guests?
My problem is as follows:

I have a customLogin implemented, this checks the login/password combination in database, this means that no guest logins are allowed (am I wrong?).

Now, I want to show the list of rooms to anybody who visits the page, but has to login to play a game. Is this possible without any dirty hack?

I was more thinking on lines of
1. SFS Connect
2. getRoomList (this doesn't work on login!!!!)
3. Login if required and play game.

But I have observed that getRoomList does not work without logging in.

This is the solution I have thought of.
1. Generate a random guest name in the client and do a login to the server. Set a user property indicating he/she is a guest.
2. Then when user joins a game, kick him out and display a login box (Dirty)

I see a lot of dirty and hacked code with this.

Is there a better way?


Regards,
Yaswanth
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post by appels »

It would be easier just to use priviliges, assign guest at login with no rights to join any rooms so he can retrieve the rooms list.
Then once he's ok to join a room, change his privileges.
yaswanth
Posts: 32
Joined: 27 Sep 2008, 21:02

Smartfox Privileges

Post by yaswanth »

Hi appels,

Thank you for your reply. Essentially, even I was thinking that it would be good if there was some kind of ACL for smartfox as well. But from what you speak, does smartfox have any inbuilt privilege system? I have seen only one about Spectator, Player, Moderator.

Can we create our own users with custom privileges? In fact it would be great if you can point me in that direction.

Regards,
Yaswanth
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Post by appels »

hmm yes, in SFS2 there is, didn't see this was for SFS1 but if I recall there is one also. If not you would need to do it like you said. Check the docs.
Post Reply