From cb615091f796b3d885d445f2da163ca82d560c32 Mon Sep 17 00:00:00 2001 From: Nick Chambers Date: Mon, 19 Jul 2021 17:37:27 -0500 Subject: [PATCH] Add isupport to plugins --- rowbot | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/rowbot b/rowbot index 608ca59..82c5e22 100755 --- a/rowbot +++ b/rowbot @@ -475,6 +475,22 @@ on_sys_init_999_welcome() { get_option chan "" } +on_msg_005_welcome() { + declare -gA isupport + local param key value + + for param in "${args[@]:1:${#args[@]}-2}"; do + # This is a valid assignment, not a comparison. + # shellcheck disable=SC1097 + IFS== read -r key value <<< "$param" + # While isupport is unused, it's still there in case later code wants to + # use it. + # shellcheck disable=SC2034 + isupport[$key]=$value + debug "isupport: %s = %s" "$key" "$value" + done +} + on_sys_register_999_welcome() { if [[ ${config[chan]} ]]; then irc_join "${config[chan]}" @@ -587,7 +603,7 @@ irc_on_004() { } irc_on_005() { - log_debug "received inotify specification: ${msg_args[*]}" + log_debug "received inotify specification: ${msg_args[*]:1}" } irc_on_250() {