Menu

perl plugin and online buddies

2007-11-09
2013-01-14
  • Gligan Calin Horea

    I'm having a problem cheching if a buddy is online/offline from a perl plugin.
    I can get the status of a buddy, but that status never is always reported as it was when I start the plugin:

    For example:
    Buddy "Greg" is online when I start the plugin. I check his status and it says it's online. 10 minutes later he signs out, I can see in my buddy list that he is offline, but the plugin still says he is online.
    If I disable/enable the plugin it returns the correct status for user "Greg" as offline.

    This are the stept I take when I check the status of a user :

    ...
    my $buddy = Purple::Find::buddy($account,$name);
    my $presence = Purple::BuddyList::Buddy::get_presence($buddy);
    my $status = Purple::Presence::is_online($presence);
    return $status;

    Pidgin doesn't throw any errors, and the I can't find any problems with the plugin.

    If you have any idea how can I make the plugin return the real status of a user, it would be greatly appreciated!

     
    • Etan Reisner

      Etan Reisner - 2007-11-20

      Where are you running that code from when it reports the correct and incorrect values?