mirror of
https://github.com/adulau/aha.git
synced 2024-12-26 10:46:11 +00:00
AHA captures now insults typed by a user
The ihook.sh must be set in the global bash.rc The hook is needed to pass invalid commands already fetched by bash to kernel space which are then transfered to the daemon
This commit is contained in:
parent
e2714b2ef9
commit
0741943282
2 changed files with 52 additions and 0 deletions
44
aha/ihook.sh
Normal file
44
aha/ihook.sh
Normal file
|
@ -0,0 +1,44 @@
|
|||
command_not_found_handle() {
|
||||
echo $1
|
||||
ARGS=""
|
||||
if [ ! -z "$1" ]; then
|
||||
ARGS="$ARGS$1"
|
||||
fi
|
||||
|
||||
if [ ! -z "$2" ]; then
|
||||
ARGS="$ARGS $2"
|
||||
fi
|
||||
|
||||
if [ ! -z "$3" ]; then
|
||||
ARGS="$ARGS $3"
|
||||
fi
|
||||
|
||||
if [ ! -z "$4" ]; then
|
||||
ARGS="$ARGS $4"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -z "$5" ]; then
|
||||
ARGS="$ARGS $5"
|
||||
fi
|
||||
|
||||
if [ ! -z "$6" ]; then
|
||||
ARGS="$ARGS $6"
|
||||
fi
|
||||
|
||||
if [ ! -z "$7" ]; then
|
||||
ARGS="$ARGS $7"
|
||||
fi
|
||||
|
||||
if [ ! -z "$8" ]; then
|
||||
ARGS="$ARGS $8"
|
||||
fi
|
||||
|
||||
if [ ! -z "$9" ]; then
|
||||
ARGS="$ARGS $9"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
/sbin/user_insult $ARGS
|
||||
}
|
8
aha/user_insult.c
Normal file
8
aha/user_insult.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int argc,char* argv[])
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue