Mercurial > hg
changeset 1029:1d35e297a8c4
[BP-76c03fafabd3] Make the sample event script more portable
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Thu, 16 Nov 2006 19:30:12 +0100 |
parents | 8569e3535305 |
children | 923cf5a92b44 |
files | mcabber/contrib/eventcmd |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/contrib/eventcmd Thu Nov 16 19:30:12 2006 +0100 +++ b/mcabber/contrib/eventcmd Thu Nov 16 19:30:12 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