Mercurial > hg
changeset 1000:76c03fafabd3
Make the sample event script more portable
Thanks to Khalil Petit.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 05 Nov 2006 18:05:14 +0100 |
parents | 9687ecc59303 |
children | dff25377c11f |
files | mcabber/contrib/eventcmd |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/contrib/eventcmd Sat Nov 04 22:06:37 2006 +0100 +++ b/mcabber/contrib/eventcmd Sun Nov 05 18:05:14 2006 +0100 @@ -19,19 +19,19 @@ # Note that the 4th argument is only provided for incoming messages # and when 'event_log_files' is set. -if [ $event == "MSG" ]; then +if [ $event = "MSG" ]; then case "$arg1" in IN) # Incoming message from buddy $arg2 $CMD_MSG_IN > /dev/null 2>&1 - if [[ -n "$filename" && -f "$filename" ]]; then + if [ -n "$filename" -a -f "$filename" ]; then # We could process filename here... /bin/rm $filename fi ;; MUC) # Groupchat message in room $arg2 - if [[ -n "$filename" && -f "$filename" ]]; then + if [ -n "$filename" && -f "$filename" ]; then # We could process filename here... /bin/rm $filename fi @@ -40,7 +40,7 @@ # Outgoing message for buddy $arg2 ;; esac -elif [ $event == "STATUS" ]; then +elif [ $event = "STATUS" ]; then # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A) echo > /dev/null fi