From 73e39aad7eba4ea70cd5dfc5979d7d74efbd089c Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 19 Dec 2025 03:26:05 -0500 Subject: [PATCH] Hopefully fixed ignore not ignoring. --- bot.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/bot.sh b/bot.sh index 8965b03..94b4009 100755 --- a/bot.sh +++ b/bot.sh @@ -109,6 +109,11 @@ rm_input() { fi } +is_ignored() { + local nick="$1" + [[ -n "$ignoreList" && "$nick" =~ ^($ignoreList)$ ]] +} + # Function to stop ping monitor process stop_ping_monitor() { if [[ -n "$pingMonitorPid" ]] && kill -0 "$pingMonitorPid" 2>/dev/null; then @@ -297,7 +302,9 @@ while true; do kickerName="${kickerName:1}" kickerChannel="${result##*#}" kickerChannel="#${kickerChannel%% *}" - msg "$kickerChannel" "$kickerName: $(shuf -e -n1 "fuck you" "go fuck yourself")!" + if ! is_ignored "$kickerName"; then + msg "$kickerChannel" "$kickerName: $(shuf -e -n1 "fuck you" "go fuck yourself")!" + fi fi ;; # run when someone joins @@ -306,6 +313,9 @@ while true; do who="${who:1}" from="${result#*#}" from="#$from" + if is_ignored "$who"; then + continue + fi if [ "$who" = "$nick" ]; then continue fi @@ -321,6 +331,9 @@ while true; do who="${who:1}" from="${result#*#}" from="#$from" + if is_ignored "$who"; then + continue + fi if [ "$who" = "$nick" ]; then continue fi @@ -336,6 +349,9 @@ while true; do who="${result%%!*}" who="${who:1}" from="${who%!*}" + if is_ignored "$who"; then + continue + fi command="${result#:* PRIVMSG [[:alnum:]_-]*:}" command="${command//# /}" will="${command#* }" @@ -366,6 +382,9 @@ while true; do who="${result%%!*}" who="${who:1}" + if is_ignored "$who"; then + continue + fi from="${result#*#}" from="${from%% *}" from="#${from:-${channels[0]}}"