From 8f9bf278a52ead914b1b9e13bacf59b8e5a3e569 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Thu, 19 Nov 2020 12:55:32 +0100 Subject: [PATCH] always submit most current nicklist --- channel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/channel.sh b/channel.sh index 6117050..dfa6528 100755 --- a/channel.sh +++ b/channel.sh @@ -46,7 +46,7 @@ nicklist(){ [ -d "/proc/$p" ] && nicklist="${nicklist}/$nick/" \ || sed -i -E "/^$s $p /d" "$nickfile" done <"$nickfile" - if ! tail -n20 "$chatfile" |grep -qxF "$nicklist"; then + if ! tail -n20 "$chatfile" |tac |grep -m1 '^NICKNAMES: ' |grep -qxF "$nicklist"; then printf '%s\n' "$nicklist" >>"$chatfile" fi } -- 2.39.2