# Script for jIRCii http://jircii.hick.org/jircii/ # For systems with "xmms-shell" installed # # Get it here http://sourceforge.net/projects/xmms-shell/ # # Will output the currently playing xmms track to # the current active window. # alias xmms { # open filehandle to the output of the command $songhndl = exec("xmms-shell -e currenttrack"); # If there is an error, catch it if (checkError($error)) { echo("I can't seem to find your xmms-shell app."); echo("Is it in your system PATH ?"); } else { # Assign to $songname the output read from the filehandle $songname = readln($songhndl); # If xmms isn't running, complain if ($songname eq "EOF") { echo("It would appear that xmms isn't running"); return; } # Output the result to current active window if ( -ischannel $active) { # if In channel, say it in channel say($songname); } else { # if somewhere else, keep it to yourself echo($songname); } } }