change tabs to spaces

This commit is contained in:
sceox 2021-07-12 08:03:31 -07:00
parent 88a3881894
commit 0060552aba

View File

@ -3,6 +3,8 @@
# TODO: make sure only nagios can write to $inputf and $msgf, else do not run # TODO: make sure only nagios can write to $inputf and $msgf, else do not run
# configuration area # configuration area
# TODO: separate configuration into a file owned by nagios user.
# this improves security and allows reinstall (from git) to not clobber config.
nick='nagios' nick='nagios'
chan='#ops' chan='#ops'
server='irc.anarchyplanet.org' server='irc.anarchyplanet.org'
@ -17,14 +19,14 @@ joinmsg="nagios bot reporting"
touch $msgf touch $msgf
connect() { connect() {
echo "NICK $nick" > $inputf echo "NICK $nick" > $inputf
echo "USER $nick 8 * : $nick" >> $inputf echo "USER $nick 8 * : $nick" >> $inputf
echo "PRIVMSG NickServ : identify $password" >> $inputf echo "PRIVMSG NickServ : identify $password" >> $inputf
echo "JOIN $chan" >> $inputf echo "JOIN $chan" >> $inputf
echo "PRIVMSG $chan : $joinmsg" >> $inputf echo "PRIVMSG $chan : $joinmsg" >> $inputf
} }
reconnect() { reconnect() {
exec $0 exec $0
} }
delay() { delay() {
while read line while read line
@ -61,7 +63,7 @@ do
;; ;;
*'Cannot join'*) sleep 10; echo "JOIN $chan" >> $inputf *'Cannot join'*) sleep 10; echo "JOIN $chan" >> $inputf
;; ;;
*'ERROR :Closing link:'*) reconnect *'ERROR :Closing link:'*) reconnect
;; ;;
esac esac
done done