Mercurial > hg
comparison mcabber/contrib/eventcmd @ 316:e315566f09b0
Add a sample script for the events command
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 15 Jul 2005 13:52:45 +0100 |
parents | |
children | c5a7a7273986 |
comparison
equal
deleted
inserted
replaced
314:1ceb68eb2fc1 | 316:e315566f09b0 |
---|---|
1 #! /bin/sh | |
2 # | |
3 # Sample events script for mcabber | |
4 # Plays a sound when receiving a message | |
5 # | |
6 # To use this script, set the "events_command" option to the path of | |
7 # the script (see the mcabberrc.example file for an example) | |
8 # | |
9 # MiKael, 2005-07-15 | |
10 | |
11 # The following sound comes with the gtkboard package, | |
12 # you can modify this line to play another one... | |
13 CMD_MSG_IN="/usr/bin/play /usr/share/sounds/gtkboard/machine_move.ogg" | |
14 | |
15 event=$1 | |
16 arg1=$2 | |
17 arg2=$3 | |
18 | |
19 if [ $event == "MSG" ]; then | |
20 case "$arg1" in | |
21 IN) | |
22 # Incoming message from buddy $arg2 | |
23 $CMD_MSG_IN > /dev/null 2>&1 | |
24 ;; | |
25 OUT) | |
26 # Outgoing message for buddy $arg2 | |
27 ;; | |
28 esac | |
29 fi | |
30 |