From cf54d46348c5e6d6c6f5bf9749898b19cac11eee Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Sat, 17 Jul 2021 01:06:38 -0500 Subject: [PATCH] Eliminate all generic magic --- rowbot | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/rowbot b/rowbot index 0bed97d..04aeec3 100755 --- a/rowbot +++ b/rowbot @@ -411,6 +411,14 @@ on_sys_register_999_annoyatron900() { log_debug "process %d is being annoying" "$alarm_pid" } +on_sys_exit_997_annoyatron900() { + log_debug "shutting down annoyatron900" + + if [[ -v alarm_pid ]] && is_running "$alarm_pid"; then + kill -STOP "$alarm_pid" + fi +} + ### # register with the server ### @@ -432,15 +440,17 @@ on_sys_register_999_welcome() { if [[ ${config[chan]} ]]; then irc_join "${config[chan]}" fi - - config[nick]=${msg_args[0]} - irc_who "${config[nick]}" %%uht,42 } ### # magic required to make privmsg work ### +on_sys_register_001_privmagic() { + config[nick]=${msg_args[0]} + irc_who "${config[nick]}" %%uht,42 +} + on_msg_354_privmagic() { if (( msg_args[1] == 42 )); then log_debug "received the identifying who"