|
From: Matthew F. <mt...@fn...> - 2007-02-05 12:44:31
|
I am trying to write a Perl API plugin to change the current Away message
automatically.
I created a new Saved Status (using the menu in Gaim), and titled it
MyAwayStatus. Then I placed the following lines in a perl plugin:
$status = Gaim::SavedStatus::find("MyAwayStatus");
$status -> set_message("My new Away message");
I then selected MyAwayStatus as my current Away status in Gaim, and loaded
my plugin. However, my Away message did not change. Other users still see
my old Away message in their Buddy List, and Gaim still auto-replies with
my old message when it receives incoming IMs.
However, when I looked in the Saved Statuses, I found that the saved
message for my current status had indeed changed. If I manually change to
another status (e.g. Available) and back to MyAwayStatus, my Away message
gets changed to the new one, as expected. How can I make this happen
automatically?
In the C API there is a function
void gaim_savedstatus_activate(GaimSavedStatus *saved_status)
to activate a saved status, but I can't find any analogous function in the
Perl API (I looked in libgaim/plugins/perl/common/SavedStatuses.xs).
I'm confused, as the SavedStatus part of the Perl API seems to be of very
limited use if there's no way to activate a status. Or am I missing
something?
Matthew.
(NB I posted this question to the "Users helping users" forum too)
|