Cleanup scaffolds
[mirrors/Programs.git] / bash / bbs / chat.sh
CommitLineData
21c4e167
H
1#!/bin/bash
2room="room.txt";
3nick="Harvie"
4
5PS3="Choose: "
6select i in $(ls *) quit
7do
8 [ $i = "quit" ] && exit 0
9 echo "You chose $i"
10done
11
12
13H="$(( $LINES-10 ))";
14W="$(( $COLUMNS-2 ))";
15
16echo $W
17echo $H
18exit
19
20chat_send_msg() {
21 dialog --inputbox "Enter message" "$H" "$W" 2>>"1"
22 if [ "$?" != 0 ]; then exit; fi;
23 echo >>"$room"
24
25}
26
27while true; do
28 dialog --tailbox "$room" "$H" "$W";
29 if [ "$?" != 0 ]; then exit; fi;
30 chat_send_msg "$room" "$nick";
31done;
This page took 0.141646 seconds and 4 git commands to generate.