Menu

Anyway to detect a users status?

2006-11-22
2013-03-22
  • Steve Ryherd

    Steve Ryherd - 2006-11-22

    Available / Away / Offline?

    I'd like to use the bot to detect the status of my REAL SN and then store that in a file to be used by other PHP requests.

     
    • Blanket Jackson

      Blanket Jackson - 2008-05-14

      In the file aim.php there is a function called: function onUpdateBuddy($data)

      In this function you can have the following to detect the Available, Away, Online, and Offline status of a user.

      --------------------------------------------------------------

      //To detect the Available and Away status:

      // Sets the variable $status to "Available" or "Away"
      $status = "Available";
      if ($info['uc'] != " O"){
          $status = "Away";
      }
      echo $status;

      --------------------------------------------------------------

      //To detect the Online and Offline status:

      // Sets the variable $status to "Offline" or "Online"
      $status = "Offline";
      if ($info['online'] == "T"){
          $status = "Online";
      }
      echo $status;

      --------------------------------------------------------------

       

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.