Mercurial > hg
comparison mcabber/contrib/events/eventcmd.osd @ 2169:4889f429fdd0
Get read of bashism in contrib/events/eventcmd.pastebin
thanks to Raphael Geissert, see Debian BTS issue ##772307.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 15 Feb 2015 12:12:22 +0100 |
parents | fcef5d34b7d4 |
children |
comparison
equal
deleted
inserted
replaced
2168:87244845fd9c | 2169:4889f429fdd0 |
---|---|
15 arg2=$3 | 15 arg2=$3 |
16 filename=$4 | 16 filename=$4 |
17 # Note that the 4th argument is only provided for incoming messages | 17 # Note that the 4th argument is only provided for incoming messages |
18 # and when 'event_log_files' is set. | 18 # and when 'event_log_files' is set. |
19 | 19 |
20 if [ $event = "MSG" ]; then | 20 if [ "$event" = "MSG" ]; then |
21 case "$arg1" in | 21 case "$arg1" in |
22 IN) | 22 IN) |
23 # Incoming message from buddy $arg2 | 23 # Incoming message from buddy $arg2 |
24 echo "You have an IM from <$arg2>" | $XOSD_CMD_PIPE > /dev/null 2>&1 | 24 echo "You have an IM from <$arg2>" | $XOSD_CMD_PIPE > /dev/null 2>&1 |
25 if [ -n "$filename" -a -f "$filename" ]; then | 25 if [ -n "$filename" -a -f "$filename" ]; then |
36 ;; | 36 ;; |
37 OUT) | 37 OUT) |
38 # Outgoing message for buddy $arg2 | 38 # Outgoing message for buddy $arg2 |
39 ;; | 39 ;; |
40 esac | 40 esac |
41 elif [ $event = "STATUS" ]; then | 41 elif [ "$event" = "STATUS" ]; then |
42 # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A) | 42 # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A) |
43 echo "<$arg2> has changed status to: [$arg1]" | $XOSD_CMD_PIPE > /dev/null 2>&1 | 43 echo "<$arg2> has changed status to: [$arg1]" | $XOSD_CMD_PIPE > /dev/null 2>&1 |
44 echo > /dev/null | 44 echo > /dev/null |
45 fi | 45 fi |
46 | 46 |