This is an old revision of the document!
Table of Contents
Xchat plugin: commands gmusicbrowser from xchat
It's at a very early stage so be kind. It is inspired from rythmbox xchat perl plugin.
Installing the script
Changing the message displayed
Edit the script (in your editor of choice) and update the message printed.
# message string my $playing ="écoute sur son magnétophone numérique"; #replace with your own message
The script can display all the informations provided by Dbus to modify the output: Dbus provides album, artist, disc, length, title, track. The current scrip displays artist - title - album
as shown below.
sub gm_play{ my $info= $object->CurrentSong; # hash keys are : album, artist, disc, length, title, track # $info hash contains the keys value above. you can change below to display information you need. keep "me" (command will generate the slash). Xchat::command "me $playing $info->{artist} - $info->{title} - $info->{album}"; }
To display say artist - album - song - tracknumber
you would use
Xchat::command "me $playing $info->{artist} - $info->{album} - $info->{title} - $info->{track}";
Once you are happy with it Load it into xchat. Xchat Menu → Load plugin or script → Browse to the location of the script.
If you messed up you will get an error message
Along those lines… Compare the original script with your update, above or on the line number given.
Error loading '/home/laurent/.xchat2/gmplay.pl': Bareword found where operator expected at (eval 29) line 60, near ") Xchat::print" syntax error at (eval 29) line 60, near ") Xchat::print"
if everything is fine Xchat will let you know buy printing the message
Loaded gmusic XChat 0.0.2:
Commands available
Help
Now that you have installed and updated your script.
What can it do ?
in xchat type
/gm_help
Todo list
Lots ;) Updating the page…