# gabfest.pl # updated by Brian Henning # License: GPL # # Based upon: #GAIMFestival.pl #By: Matt Davis #Screen Name: dasmittel #License: GPL # #This is a perl plugin written for GAIM version 0.11 #It will make festival read your incoming messages to you #after stripping out any html tags that the windows clients send # #The fork allows the message to be displayed as it is being said. If #system was used, the message would not display until after festival was #done saying it. # #03/17/01 use Gaim; %PLUGIN_INFO = ( perl_api_version => 2, name => "GabFest", version => "0.5", summary => "Uses Festival to read incoming instant messages", description => "There's nothing more to say about this plugin.", author => "Matt Davis, recoded by Brian Henning", url => "", load => "plugin_load", unload => "plugin_unload" ); sub plugin_init { return %PLUGIN_INFO; } sub plugin_load { $plugin = shift; Gaim::signal_connect(Gaim::Conversations::handle, "received-im-msg", $plugin, \&festival_say, 0); # Gaim::signal_connect($plugin, Gaim::Conversation, "received-im-msg", \&festival_say); unless(fork){exec("echo Gabfest has loaded | artsdsp festival -b --tts");} Gaim::print("Meaningless Drivel", "The damn thing is loaded, not that it does any good."); } sub plugin_unload { $plugin = shift; Gaim::print("GabFest", "GabFest has unloaded."); } sub festival_say { my ($gc, $sendername, $message, $flags) = @_; $_ = $message; s/<(?:[^>\'\"]*|([\'\"]).*?\1)*>//gs; #Parse out most HTML. See note 1. s/\'//g; #These lines remove characters that cannot be sent to festival s/\"//g; # via the command line s/\(//g; s/\)//g; s/\>//g; s/\