aka_bigred has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to write a perl based pidgin plugin that will disable an account programatically. I think I found code that will properly enable the account, but I can't seem to figure out how to disable it. I expected to just change the TRUEs to FALSEs, but that doesn't work.

Unfortunately, beyond the perl howto on pidgin's website, I've found next to nothing to help me out.

Here's the code I found that will connect an account

###### Use this snippet to connect the account ###### $slaveAccount->set_status("available", TRUE); $slaveAccount->set_enabled(Purple::Core::get_ui(), TRUE); $slaveAccount->connect(); Purple::Debug::info("MultiLocSyncPlugin","Slave account was forced to +connect\n"); ###### END Use this snippet to connect the account ######

That code works well, but I tried to opposite to disconnect, but it doesn't completely work. It still shows the account in the active section, though it is disconnected. In order to reconnect the account, I must manually disable the account from the menu before I then enable it. Without manually disabling it, the account won't show up in the enable list.

###### Use this snippet to disconnect the account ###### ##$slaveAccount->set_status("available", FALSE); $slaveAccount->disconnect(); ##$slaveAccount->set_enabled(Purple::Core::get_ui(), FALSE); Purple::Debug::info("MultiLocSyncPlugin",$slaveAccount . " was forced +to disconnect\n"); ###### END Use this snippet to disconnect the account ######

Here's an snippet of a screenshot showing the partially disabled account: http://bytality.com/offsite/images/pidgin_unclean_disable_via_perl.jpg

Any help would be greatly appreciated.