# HG changeset patch # User Mikael Berthe # Date 1121431965 -3600 # Node ID e315566f09b019e145c7f3ea908dbaab724943d0 # Parent 1ceb68eb2fc1b116c571387f114f0302bce8f5f1 Add a sample script for the events command diff -r 1ceb68eb2fc1 -r e315566f09b0 mcabber/contrib/eventcmd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcabber/contrib/eventcmd Fri Jul 15 13:52:45 2005 +0100 @@ -0,0 +1,30 @@ +#! /bin/sh +# +# Sample events script for mcabber +# Plays a sound when receiving a message +# +# To use this script, set the "events_command" option to the path of +# the script (see the mcabberrc.example file for an example) +# +# MiKael, 2005-07-15 + +# The following sound comes with the gtkboard package, +# you can modify this line to play another one... +CMD_MSG_IN="/usr/bin/play /usr/share/sounds/gtkboard/machine_move.ogg" + +event=$1 +arg1=$2 +arg2=$3 + +if [ $event == "MSG" ]; then + case "$arg1" in + IN) + # Incoming message from buddy $arg2 + $CMD_MSG_IN > /dev/null 2>&1 + ;; + OUT) + # Outgoing message for buddy $arg2 + ;; + esac +fi +