Portál AbcLinuxu, 5. května 2025 10:15
cat >~/.gaim/command.pl <<EOF use Gaim; my $command = "xmessage \"message received\""; %PLUGIN_INFO = ( perl_api_version =%gt; 2, name => "command", summary => "run $command when a message is received", load => "plugin_load", ); sub plugin_init { return %PLUGIN_INFO; } sub plugin_load { my $plugin = shift; Gaim::signal_connect(Gaim::Conversations::handle, "received-im-msg", $plugin, \&received_im_msg, 0); } sub received_im_msg { system "$command"; } EOF--- cut here --- gaim: Perl Scripting HOWTO
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.