]> git.plutz.net Git - httpchat/commitdiff
always submit most current nicklist
authorPaul Hänsch <paul@plutz.net>
Thu, 19 Nov 2020 11:55:32 +0000 (12:55 +0100)
committerPaul Hänsch <paul@plutz.net>
Thu, 19 Nov 2020 11:55:32 +0000 (12:55 +0100)
channel.sh

index 6117050ba9f20bb2de720f1d75158f06a7e9ef62..dfa6528d492f2adfdd4586a1081dbde809b02400 100755 (executable)
@@ -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
 }