X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=channel.sh;h=f8c97a43ae1622f627f518d52a9df40c6d0e5f3f;hb=762b478190c9c192863312a613fc9722b1f4d533;hp=6117050ba9f20bb2de720f1d75158f06a7e9ef62;hpb=5cd918eae00d328182effc903245fd98c7f980e7;p=httpchat diff --git a/channel.sh b/channel.sh index 6117050..f8c97a4 100755 --- a/channel.sh +++ b/channel.sh @@ -46,16 +46,17 @@ 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 } if [ ! -f "$chatfile" ]; then yield_page create <<-EOF + [h1 No such Channel] [form #nonexist method="POST" There is no channel named $(HTML "$LOCATION") - [submit "action" "create" Create] + [submit "action" "create" Set Up] ] EOF else