XMMS-Control Plugin (For X-Chat)
Long ago, before the dawn of time... Or before breakfast - I forget which... Anyhoo, a while back, we had an XMMS control plugin for X-Chat. It worked fine for just showing what you were playing to others, but it was just plain white and boring, and the "send" function was broken. Luckily, it was licenced under the wonderful GNU/GPL and was written in C. Naturally I had to hack it up a bit.
The first thing I did was to fix the send feature - that was the most important thing (to me, at least). I record lots of songs/bits of song and I like send these to other people - having a "send current song" button is great for this. The second thing I changed were the colours. I'd been doing work on TuxServe for a while when I first started playing with this code, so I'd already invented my trademark colour scheme. All I had to do was apply it to the XMMS plugin. Which was easy enough.
After that was done, someone requested a feature that will make it choose random colours - which was added. Then I added in a feature that allows you to define your own colours via a text file (some people didn't like the default colours). And that is pretty much it.
When you tell it to show the current song playing, it will display the following info to the current channel: the artist, the song name, quality (kbit rate and frequency), track length, file size, track number and total tracks on the playlist. This information cannot be changed without altering the code (which you are all free to do).
This plugin (since version 0.3.5) will now keep a list of songs and music files which have been sent to you via DCC. It will then allow you, via the command "lr", to list these files - and even add them to your XMMS playlist, with the command "pr #" (where # is the number assigned to it on the list given by the "lr" command).
Here's an example of what it looks like (with the default colours):

This project is released under the GNU/GPL, as always, meaning that you can alter and redistribute the code. This plugin was originally written and released by Tim Welch, but is now maintained by Aypok and Michael Gabilondo.
Compilation And Installinating
After you have extracted all the files, "cd" to the dir where it was extracted to and type "make", then "make install".
"make" will compile it and "make install" will copy it to ~/.xchat2/
If your X-Chat dir is somewhere else, I suggest you don't use "make install" and instead copy it by hand to the root of the X-Chat dir.
It doesn't actually need to be in the root of the X-Chat dir, but that makes it automagically load with X-Chat. You can place it anywhere you want.
Usage
To load this plugin (if you didn't install it into the root of the X-Chat dir, as explained above), type "/load <path_to_plugin>/xmms-control.so".
Here's a list of all commands that this plugin accepts:
/xmms - displays song to current window
/xmms show - same as above
/xmms help - shows this list to you
/xmms play - play current song
/xmms next - play and display next song
/xmms prev - play and display previous song
/xmms qnext - play next song (Quiet Next)
/xmms qprev - play previous song (Quiet Prev)
/xmms lr - List Recently received files
/xmms pr # - Play and display Recently received file #
/xmms stop - stop playing
/xmms goto # - go to # song in the playlist
/xmms +/- - volume up/down 5%
/xmms delete - delete current song from playlist
/xmms send <nick> - sends current song to <nick>
/xmms psend <nick> - psends current song to <nick>
/xmms reload - reloads config from file
/xmms random - randomise colours (will show the song)
Config File
The default colours are very bright and not to everyone's taste. You can either use the command "/xmms random" to set it to use some random colours, but that won't be saved. There is a way for you to define you own colours via a config
file.
It will look for 2 config files. First it will look for its own config file, "xmms-control.cfg" in the root of the X-Chat dir. If that is not found, it will look for a TuxServe config file: "/tuxserve/config.cfg". If neither are found, it will default to the bright colours.
To create your own config file, you need to put this into a text file and save it as "xmms-control.cfg" in the root of the X-Chat dir:
--
colour==4
colour==12
colour==9
colour==7
colour==8
max_recent==15
filetypes==,ogg,mp3,flac,wma,mid,
--
Those are the default colours. The numbers are the colour numbers and refer to the X-Chat colours - any valid X-Chat colour is valid for this. the second colour (set to 12 in the above example) is unused and can be set to anything. Setting the first number to "50" will make it automagically choose random colours every time. (note: don't include the "--" lines, they are used to show the code).
"max_recent" is the maximum number of received files to keep track of. This defaults to 15, but you can set it (via this) to be any number you want. Setting it to a negative value means that there is no maximum, whereas a value of 0 effectively disables this feature.
"filetypes" is a comma seperated list of file extensions with no spaces (spaces are not ignored) which you want the plugin to keep track of. All files which you receive that end in any of the extentions in the list above will be tracked and added to the list of recently received files (adhering to the "max_recent" limit, of course). If the received file is of an extension not listed, the plugin will ignore it.
Also notice the "," at the start and at the end of the list - this is required! The file extensions are not case sensitive. Filetypes can also be set to '*' which means all files are added to the recent audio files list. This is generally not recommended, as it can result in a cluttered list with many items that are not audio files.
The default list of extensions is:
,ogg,mp3,flac,midi,wav,au,wma,pcm,mp2,vox,
raw,cda,aac,ac3,mid,ra,ram,mp4,prs,sid,
aicf,aiff,it,mod,mpeg,asx,voc,stm,xi,xm,
riff,s3m,sclps,pls,
After you have changed this file, you will need to use the command "/xmms reload" - you do not need to reload the plug or X-Chat.
Download