Add more debug statements
This commit is contained in:
parent
81e3cdd878
commit
efaa0cace0
1 changed files with 20 additions and 19 deletions
33
rowbot
33
rowbot
|
@ -133,6 +133,17 @@ cleanup() {
|
|||
|
||||
trap cleanup EXIT
|
||||
|
||||
alarm-handler() {
|
||||
ping "row your bot gently down the stream"
|
||||
|
||||
if [[ $keep_trying = yes ]]; then
|
||||
info "trying for %s again" "$desired_nick"
|
||||
nick "$desired_nick"
|
||||
fi
|
||||
}
|
||||
|
||||
trap alarm-handler ALRM
|
||||
|
||||
###
|
||||
# reload code
|
||||
###
|
||||
|
@ -272,10 +283,14 @@ on_001() {
|
|||
join "$chan"
|
||||
fi
|
||||
|
||||
{
|
||||
debug "timer pid is %d" "$BASHPID"
|
||||
|
||||
while true; do
|
||||
kill -ALRM "$$"
|
||||
sleep 10
|
||||
done &
|
||||
done
|
||||
} &
|
||||
|
||||
ping_pid=$!
|
||||
nick=${params[0]}
|
||||
|
@ -477,21 +492,6 @@ who() {
|
|||
fi
|
||||
}
|
||||
|
||||
###
|
||||
# keepalive code
|
||||
###
|
||||
|
||||
alarm-handler() {
|
||||
ping "row your bot gently down the stream"
|
||||
|
||||
if [[ $keep_trying = yes ]]; then
|
||||
info "trying for %s again" "$desired_nick"
|
||||
nick "$desired_nick"
|
||||
fi
|
||||
}
|
||||
|
||||
trap alarm-handler ALRM
|
||||
|
||||
###
|
||||
# app hooks
|
||||
##
|
||||
|
@ -709,6 +709,7 @@ if [[ $reload = yes ]]; then
|
|||
privmsg "$RELOAD_TO" done.
|
||||
else
|
||||
registered=no
|
||||
info "rowbot's pid is %d" "$$"
|
||||
nick "$nick"
|
||||
user "$ident" "$realname"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue