#!/bin/sh
# Aviation Config file maker (c) 1998 by Mixter
# usage: ./mkconf [config-file]
if test -z $1 ; then conf=conf ; fi
if test ! -z $1 ; then conf=$1 ; fi
printf "\n\taviation config v2.0 by Mixter\n"
> $conf ; chmod +x $conf
echo #!`pwd`/eggdrop >> conf
printf "Bot nick [lamestbot]: " ; read fd
if test ! -z $fd ; then echo set nick1 \"$fd\" >> $conf
mv userfile userfile.$fd ; fi
if test -z $fd ; then echo set nick1 \"lamestbot\" >> $conf
mv userfile userfile.lamestbot ; fi
printf "Bot ident ["`whoami`"]: " ; read fd
if test ! -z $fd ; then echo set username \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set username \"`whoami`\" >> $conf ; fi
printf "Bot ircname [random]: " ; read fd
if test ! -z "$fd" ; then echo set realname \"$fd\" >> $conf ; fi
printf "Bot owner [Mixter]: " ; read fd
if test ! -z $fd ; then echo set owner \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set owner \"Mixter\" >> $conf ; fi
printf "Listening ports(all) [12345]: " ; read fd
if test ! -z $fd ; then echo set allport \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set allport \"12345\" >> $conf ; fi
printf "Listening ports(users) [none]: " ; read fd
if test ! -z $fd ; then echo set useport \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set useport \"0\" >> $conf ; fi
printf "Listening ports(bots) [none]: " ; read fd
if test ! -z $fd ; then echo set botport \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set botport \"0\" >> $conf ; fi
printf "Bots channels [#eggdrop]: " ; read fd
if test ! -z $fd ; then echo set botchans \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set botchans \"#eggdrop\" >> $conf ; fi
printf "IRC Network [EFNET]: " ; read fd
if test ! -z $fd ; then echo set network \"$fd\" >> $conf ; fi
if test -z $fd ; then echo set network \"EFNET\" >> $conf ; fi
echo source aviation.tcl >> $conf
printf "done\ntype \"./mkcron\" to activate crontab\n"
printf "type \"./bchk\" or \"./"$conf"\" to start the bot manually\n"
exit 0
