Just a small piece of code to block annoying BUZZ messages from your *Yahoo* buddies.
use Purple; %PLUGIN_INFO = (perl_api_version => 2, name => "Buzz blocker", version => "1.0", summary => "Block all BUZZ messages", description => "Block all BUZZ messages", author => "Huy Phan ", url => "", load => "plugin_load", unload => "plugin_unload"); sub conv_received_msg { my ($account, $sender, $message, $conv, $flags, $data) = @_; if ($message =~ /$sender has buzzed you!/) { return 1; } return 0; } sub plugin_init { return %PLUGIN_INFO; } sub plugin_load { my $plugin = shift; $conv = Purple::Conversations::get_handle(); Purple::Signal::connect($conv, "receiving-im-msg", $plugin, &conv_received_msg, "received im message"); Purple::Debug::info("plugin_load()", "loading Buzz Blocker"); } sub plugin_unload { my $plugin = shift; Purple::Debug::info("plugin_unload()", "unloading Buzz Blocker"); }
Save the code above to a file with extension .pl under ~/.purple/plugins/ and restart your pidgin.