# HG changeset patch # User Mikael Berthe # Date 1132441973 -3600 # Node ID c7f94f6e51f04896ec3dee9a874c6ae82ad41cf6 # Parent 05c0e55c4bb1573869c9ee6d6bded66c78ebf29d Update sample mcabberrc and eventcmd script diff -r 05c0e55c4bb1 -r c7f94f6e51f0 mcabber/contrib/eventcmd --- a/mcabber/contrib/eventcmd Sun Nov 20 00:08:49 2005 +0100 +++ b/mcabber/contrib/eventcmd Sun Nov 20 00:12:53 2005 +0100 @@ -15,15 +15,26 @@ 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" && -f "$filename" ]]; then + # We could process filename here... + /bin/rm $filename + fi ;; MUC) # Groupchat message in room $arg2 + if [[ -n "$filename" && -f "$filename" ]]; then + # We could process filename here... + /bin/rm $filename + fi ;; OUT) # Outgoing message for buddy $arg2 diff -r 05c0e55c4bb1 -r c7f94f6e51f0 mcabber/mcabberrc.example --- a/mcabber/mcabberrc.example Sun Nov 20 00:08:49 2005 +0100 +++ b/mcabber/mcabberrc.example Sun Nov 20 00:12:53 2005 +0100 @@ -41,13 +41,6 @@ # in the roster. #set hide_offline_buddies = 0 -# Set the auto-away timeout, in seconds. If set to a value >0, -# mcabber will change your status to away if no real activity is detected -# (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 = 0 - # History logging # You can save the messages history: set logging = 1 # You can load (read) the messages history: set load_logs = 1 @@ -64,13 +57,24 @@ # External command for events # You can specify a script or process to be launched when an event occurs. +# +# If 'event_log_files' is set, a file is created and contains the body of +# the message (incoming messages only); the file name is the last parameter. +# If you enable this, you can specify the directory mcabber will use to +# create these messages with the 'event_log_dir' variable (default is the +# system temp dir, or MCABBERTMPDIR environment variable). Please note +# that mcabber won't delete these files, it's your script's job. +# # The command is called the following way: -# $events_command MSG IN jabber@id (when receiving a message) +# $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 (when receiving a MUC message) +# $events_command MSG MUC room_id [file] (when receiving a MUC message) # $events_command STATUS X jabber@id (new buddy status is X) # See sample script in contrib/ directory. #set events_command = /home/mikael/.mcabber/eventcmd +# +#set event_log_files = 0 +#set event_log_dir = /home/mikael/.mcabber/event_files # Traces logging # If you want advanced traces, please specify a file and a level here. @@ -81,6 +85,13 @@ #set tracelog_level = 1 #set tracelog_file = /home/mikael/mcabber.log +# Set the auto-away timeout, in seconds. If set to a value >0, +# mcabber will change your status to away if no real activity is detected +# (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 = 0 + # Status messages # The "message" value will override all others, take care! #set message = Unique message status