better notification for chatrooms
[mirrors/libpurple-core-answerscripts.git] / purple / answerscripts.d / 00-notify.sh
index 3008282de8a1d38e88a3d5b27f62ffde0cc09e7a..f0d7ee117eee6dfa7650e141a47652eb39393dfb 100755 (executable)
@@ -1,3 +1,5 @@
 #!/bin/sh
 #Show notification for each incomming message
-notify-send "$ANSW_PROTOCOL:$ANSW_FROM" "$ANSW_MSG"
+ANSW_MSG="$(echo "$ANSW_MSG" | sed -e 's/&/&amp\;/g;s/</\&lt\;/g;s/>/\&gt;/g')"
+[ -n "$ANSW_R_ROOM_NAME" ] && room="$ANSW_R_ROOM_NAME:" || room=''
+notify-send -i pidgin "$ANSW_PROTOCOL:$room$ANSW_R_ALIAS" "$ANSW_MSG"
This page took 0.181029 seconds and 4 git commands to generate.