MegaHAL AI answerscript is now much more sophisticated (while still simple :-)
[mirrors/libpurple-core-answerscripts.git] / purple / answerscripts.d / 00-megahal.sh
CommitLineData
d5bbca3f
H
1#!/bin/sh
2#Artificial Pseudo Inteligence using megahal package :-)
3#More info: http://megahal.alioth.debian.org/
a315ba6c
H
4
5AI_LOUD=false #enable loud replies (otherwise will be learning only :-)
6AI_LOUD_UNAVAILABLE=true; #enable loud replies when not available :-)
7
8$AI_LOUD_UNAVAILABLE && [ "$ANSW_L_STATUS" != 'available' ] && AI_LOUD=true
9AI_ANSW="$({ echo "$ANSW_MSG" && echo -e '\n#quit\n'; } | timeout 23 megahal -p -b -w | tail -n1)"
10$AI_LOUD && [ -n "$AI_ANSW" ] && echo -n "[MegaHALuz]: $AI_ANSW"
This page took 0.161277 seconds and 4 git commands to generate.