Turn on Multiple Logins

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

Moderators: Lapo, Bax

Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Turn on Multiple Logins

Postby Bosskafett » 20 May 2012, 14:28

How do you turn on Multiple Logins in SFS PRO? Thanks.
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Turn on Multiple Logins

Postby Bax » 21 May 2012, 10:51

What does "multiple login" means?
Paolo Bax
The SmartFoxServer Team
Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Re: Turn on Multiple Logins

Postby Bosskafett » 21 May 2012, 20:39

Simply allow users to login more than once? Is it possible? I'm sure it is :lol:
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Turn on Multiple Logins

Postby rjgtav » 21 May 2012, 22:17

Hi.
Sorry but I think you misread it. A client can only login once (unless you create several SmartFoxClient instances but why would you need that?). Can you please describe better what do you want to achieve? And are you sure that you aren't referring to joining multiple rooms instead?
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Re: Turn on Multiple Logins

Postby Bosskafett » 22 May 2012, 09:58

I have created a chat application where you can join a chat from a link e.g. www.aurorachat.me/lobby. I want users to be able to login to multiple chats (rooms) but not the same one more than once. Is this possible? Thanks you. :D
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Turn on Multiple Logins

Postby rjgtav » 22 May 2012, 20:25

Hello.
You could create a Room for each Chat Room instead of different Zones. That way you would only need to login once and then you could join multiple rooms by providing true as the dontLeave parameter in the smartfox.joinRoom() method.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Re: Turn on Multiple Logins

Postby Bosskafett » 23 May 2012, 11:52

Wait, I need a user to be able to login to two client screens and have the same user in different rooms at once. Is it possible to login to the same user that's already logged into a room? This will make the user able to chat in two rooms while on the same user.
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Re: Turn on Multiple Logins

Postby Bax » 24 May 2012, 08:51

This is not possible. You can't have the same user perform two separate logins at the same time using the same username.
Paolo Bax
The SmartFoxServer Team
Bosskafett
Posts: 41
Joined: 24 Jan 2012, 00:04

Re: Turn on Multiple Logins

Postby Bosskafett » 24 May 2012, 09:52

So, the Server reads the Username ( user.getName() ) if I can randomise the end of that and record a different variable with the display username (e.g. user.setName(resObj.name + random_number) & user.setRealName(resObj.name) ). I will try something like that. Tell you what happens after.
if(_global.is_rocketsnail == 1){
mc.snail._visible = true;
smartfox.setUserVariables({snl:1, init:false})
}
The Re-creator of Old Games ;D
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Re: Turn on Multiple Logins

Postby rjgtav » 27 May 2012, 21:46

Hi.
You could try sending the SmartFoxClient object from the main client to all the other different windows, via JavaScript. Then you would just need to join multiple rooms instead of logging in multiple times.
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: No registered users and 55 guests