3 # Killfile a luser in some newsgroup, optionally specifying a time to
4 # give the luser a chance of a reprieve.
6 # First parameter is the luser to killfile.
7 # Second parameter is the newsgroup in which to killfile said luser.
8 # Third and further parameters, if present, specify a time at which to
9 # mail a message offering the luser a reprieve. Example time
10 # specifications are "now + 1 week" and "8pm Nov 6"; see at(1) for
13 exec 1>&2 # Everything goes to standard error
15 if [ "X$1" == "X" -o "X$2" == "X" ]; then
16 echo "Usage: $0 victim newsgroup [ time-spec ]"
22 KILLFILE="$HOME/News/`echo $NEWSGROUP | tr . /`/KILL"
24 if [ ! -f $KILLFILE ]; then
25 echo "Killfile for $NEWSGROUP not found"
29 echo "/$VICTIM/f:j" >> $KILLFILE
33 if [ "X$1" != "X" ]; then
34 echo "$HOME/bin/reprieve \"$VICTIM\" $NEWSGROUP \"`date`\"" | /usr/bin/at "$*" 2>/dev/null