SmIRC 0.70

Automatically playing sounds

Starting with version 0.70, SmIRC can now play sounds.

The /PLAY command

The /PLAY command can play most .wav, .au, and .aiff sounds. Playing sounds is supported on any platform that implements the Open Sound System. Although you can enter the /PLAY command yourself, a better approach is to run a bot that automatically issues /PLAY command for certain events.

The /AUTOPLAY command

As an alternative to creating bots to automatically play sounds, SmIRC has a rather simple autoplay feature. The /AUTOPLAY command takes the following form.

    /AUTOPLAY message filename

This command results in filename being played every time SmIRC prints message in any window. message is a message code from the Smirc.stringTable X resource. For example:

    /AUTOPLAY TERMINATED kaboom.wav

Plays kaboom.wav every time SmIRC prints the "Connection terminated" message.

You can enter multiple AUTOPLAY commands for the same message, and they accumulate. SmIRC chooses one of them toplay, at random, each time the message is printed.

An AUTOPLAY command without a filename deletes the current autoplay list for the message.

Initial autoplay list

SmIRC's configuration file ($HOME/.smirc/config, /usr/local/share/smirc/config, or /usr/local/etc/smirc/config), can be used to initialize the autoplay list at startup.

For now, you'll have to edit the file manually. In the future, SmIRC will have an interface to set the autoplay list.

The format for the config file is as follows:

AUTOPLAY<tab>message<tab>filename

where <tab> is the tab character.

If there are any AUTOPLAY directives in $HOME/.smirc/config, all directives in /usr/local/etc/smirc/config and /usr/local/share/smirc/config are ignored. If there are any AUTOPLAY directives in /usr/local/etc/smirc/config, all directives in /usr/local/share/smirc/config are ignored.