//if the user has entered from an other computer
if(messageSplitted.length == 2 && messageSplitted[0].compareTo("OUT") == 0 &&
messageSplitted[1].compareTo("OTH\r\n") == 0){
window.logoutNotification("Logged in from another computer");
return;
}
}
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Maybe this is a stupid question,
But how can I know when a user connects on another computer with the same account?
i use the following code in the "logout()" function inside my MsnAdapter implementation. It works.
MsnMessage message = messageChain.iterator().previous();
String[] messageSplitted = new String[1];
if(message != null){
messageSplitted = message.asString().split(" ");
//if the user has entered from an other computer
if(messageSplitted.length == 2 && messageSplitted[0].compareTo("OUT") == 0 &&
messageSplitted[1].compareTo("OTH\r\n") == 0){
window.logoutNotification("Logged in from another computer");
return;
}
}