Menu

How to know when the user signs in on another

Help
JcKosta
2007-12-19
2013-04-29
  • JcKosta

    JcKosta - 2007-12-19

    Maybe this is a stupid question,
    But how can I know when a user connects on another computer with the same account?

     
    • Nikolaos Ftylitakis

      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;
                  }
              }

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.