From: Paul Hänsch Date: Thu, 19 Nov 2020 11:55:32 +0000 (+0100) Subject: always submit most current nicklist X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=8f9bf278a52ead914b1b9e13bacf59b8e5a3e569;p=httpchat always submit most current nicklist --- 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 }