--- /dev/null
+#! /bin/sh
+#
+# Sample events script for mcabber
+# Plays a sound when receiving a message
+#
+# To use this script, set the "events_command" option to the path of
+# the script (see the mcabberrc.example file for an example)
+#
+# MiKael, 2005-07-15
+
+# Script execution comments from 'man mcabber':
+# $events_command MSG IN jabber@id [file] (when receiving a message)
+# $events_command MSG OUT jabber@id (when sending a message)
+# $events_command MSG MUC room_id [file] (when receiving a MUC message)
+# $events_command STATUS X jabber@id (new buddy status is X)
+# $events_command UNREAD "N x y z" (number of unread buddy buffers)
+# (x=attention y=muc unread buffers z=muc unread buffers with attention sign)
+#
+# Sounds from the freedesktop project (available by default in Xubuntu)
+CMD_MSG_IN="/usr/bin/play /usr/share/sounds/freedesktop/stereo/message-new-instant.oga"
+CMD_STATUS_ONLINE="/usr/bin/play /usr/share/sounds/freedesktop/stereo/service-login.oga"
+CMD_STATUS_OFFLINE="/usr/bin/play /usr/share/sounds/freedesktop/stereo/service-logout.oga"
+
+event=$1
+arg1=$2
+arg2=$3
+filename=$4
+# Note that the 4th argument is only provided for incoming messages
+# and when 'event_log_files' is set.
+
+if [ "$event" = "MSG" ]; then
+ case "$arg1" in
+ IN)
+ # Incoming message from buddy $arg2
+ $CMD_MSG_IN > /dev/null 2>&1
+ 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" -a -f "$filename" ]; then
+ # We could process filename here...
+ /bin/rm $filename
+ fi
+ ;;
+ OUT)
+ # Outgoing message for buddy $arg2
+ ;;
+ STATUS)
+ # Status change for buddy $arg2, new status is $arg1
+ echo "New status $arg1 for buddy $arg2" >> /tmp/xaa
+ ;;
+ esac
+elif [ "$event" = "STATUS" ]; then
+ # Buddy $arg2 status is $arg1 (_, O, I, F, D, N, A)
+ echo > /dev/null
+elif [ "$event" = "UNREAD" ]; then
+ # $arg1 contains 4 numbers separated with space chars:
+ # Nr of unread buffers, nr of unread buffers with attention sign,
+ # nr of MUC unread buffers, nr of MUC unread buffers with attention sign.
+ echo > /dev/null
+fi
# $events_command UNREAD "N x y z" (number of unread buddy buffers)
# (x=attention y=muc unread buffers z=muc unread buffers with attention sign)
# See sample script in contrib/ directory.
-#set events_command = ~/.mcabber/eventcmd
+set events_command = ~/.mcabber/eventcmd
#
#set events_ignore_active_window = 0
#
# When FIFO is configured, you can turn it off and on in real time with
# the 'fifo_ignore' option (default: 0). When set to 1, the FIFO input is
# still read but it is discarded.
-#set fifo_name = ~/.mcabber/mcabber.fifo
+set fifo_name = ~/.mcabber/mcabber.fifo
#set fifo_hide_commands = 0
#set fifo_ignore = 0
#
-#module load fifo
+module load fifo
# URL extractor
# Set 'url_regex' to a regular expression matching urls. If it matches an
# (command, message, move in the buddylist...). Note: auto-away only changes
# the status when it is "available" (online) or "free_for_chat".
# See 'message_autoaway' below.
-set autoaway = 300
+#set autoaway = 0
# Message blocking
# Set 'block_unsubscribed' to 1 if you want to block (drop) incoming