I am trying to kick the first logged in user from the zone when a second user logs in using the same account.
This is my code
Code: Select all
if(pass == "common")
{
// Check login
if (listByname[nick])
{
var response = new Object()
response._cmd = "loginKO";
error = "this user is already loged in from another computer";
response.err = error;
response.status = 404;
response.username = nick;
_server.sendResponse(response, -1, null, chan);
_server.kickUser(listByname[nick],0,'test Kick');
// We ask the server to login this new user
}
else
{
loginCustomUser(nick, pass, chan);
}
and I am trying to access the evenr in this way
Code: Select all
public function onAdminMessageHandler(evt:SFSEvent):void
{
trace("evt.params.message" + evt.params.message);
}
The trace is working fine yet the user is not getting kicked.
I tried to manually kick the user from the admin.
The message gets passed and the user doesn't get kicked.
Can anyone tell me what might be wrong?
Thanks in advance