version bump to 0.3.0
[mirrors/libpurple-core-answerscripts.git] / purple /
... / ...
3# This file is called for every message received by libpurple clients (pidgin,finch,...)
4# - Following env values are passed to this script:
5# - ANSW_FROM (who sent you message)
6# - ANSW_MSG (text of the message)
7# - ANSW_STATUS (unique ID of status. eg.: available, away,...)
8# - ANSW_STATUS_MSG (status message set by user)
9# - WARNING: You should mind security (don't let attackers to execute their messages/nicks!)
10# - Each line of output is sent as reply to that message
11# - You can try to rewrite this script in PERL or C for better performance (or different platform)
12# - This script have .exe suffix as i hope it can be eventualy replaced by some binary on windows
14# Basic example can look like this:
15# [ "$ANSW_STATUS" != 'available' ] && echo "<$ANSW_FROM> $ANSW_MSG" && echo "My status: $ANSW_STATUS_MSG";
17# There are lot of hacks that you can do with this simple framework if you know some scripting. eg.:
18# - Forward your instant messages to email, SMS gateway, text-to-speach (eg. espeak) or something...
19# - Smart auto-replying messages based on regular expressions
20# - Remote control your music player (or anything else on your computer) using instant messages
21# - Simple IRC/Jabber/ICQ bot (accepts PM only, you can run finch in screen on server)
22# - Providing some service (Searching web, Weather info, System status, RPG game...)
23# - BackDoor (even unintentional one - you've been warned)
24# - Loging and analyzing messages
25# - Connect IM with Arduino
26# - Annoy everyone with spam (and probably get banned everywhere)
27# - Anything else that you can imagine...
29# Maybe you will want to add more hooks for receiving messages, so i've made following script
30# - It just executes all +x files in answerscripts.d directory so you should do your magic there
31# - To disable some of those scripts just use chmod -x script
33#legacy support, please do NOT use PURPLE_* variables in new scripts,
34#this will be removed in future releases:
38#this should be modified to use run-parts in future:
39dir="$(dirname "$0")"/answerscripts.d
40if test -d "$dir"; then
41 for script in "$dir"/*; do
42 test -x "$script" && "$script"
43 done
This page took 0.118525 seconds and 4 git commands to generate.