aboutsummaryrefslogtreecommitdiff
path: root/units/ib_name.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'units/ib_name.zsh')
-rw-r--r--units/ib_name.zsh12
1 files changed, 5 insertions, 7 deletions
diff --git a/units/ib_name.zsh b/units/ib_name.zsh
index 3a8346d..13d901f 100644
--- a/units/ib_name.zsh
+++ b/units/ib_name.zsh
@@ -22,22 +22,20 @@ fi
ib_reply_name="$(sed '1!d' <<< "${reply_text}")"
-for ib_board in {a..z} 0
+for ib_board in ${board_table[@]}
do
source "${units}/ib_config.zsh"
if [[ "${ib_reply_name}" == "${ib_name}" ]]
then
break
+ elif [[ "${ib_board}" == "${board_table[-1]}" ]]
+ then
+ output_text="Could not find Image Board in replied message"
+ return
fi
done
-if [[ "${ib_board}" == "0" ]]
-then
- output_text="Could not find Image Board in replied message"
- return
-fi
-
ib_post_id="$(sed '2!d' <<< "${reply_text}" | cut -d ' ' -f 2)"
if [[ -z "${ib_post_id}" ]]