]> git.plutz.net Git - httpchat/blobdiff - channel.sh
fix syntax error m)
[httpchat] / channel.sh
index a59a5a46ddced0c0b7e1daa8559eea04f25f0cd2..f8c97a43ae1622f627f518d52a9df40c6d0e5f3f 100755 (executable)
@@ -43,19 +43,20 @@ nicklist(){
 
   nicklist='NICKNAMES: '
   while read -r s p nick; do
-    [ -d "/proc/$pid" ] && nicklist="${nicklist}/$nick/" \
+    [ -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