@@ 130,12 130,14 @@ make16
frame .foot
entry .foot.input
label .foot.msgs -textvariable lastmsg
+label .foot.sep -text " // "
+label .foot.ppl -textvariable clients
label .foot.name
scrollbar .scroll -command {.buffer yview}
text .buffer -width 72 -yscrollcommand {.scroll set}
-pack .foot.msgs -side right
+pack .foot.ppl .foot.sep .foot.msgs -side right
pack .foot.name -side left
pack .foot.input -side bottom -fill x
@@ 268,7 270,7 @@ proc bufpush {line} {
# get the sixels
set idx1 $idx2
set idx2 [string first ")" $line $idx1+2]
- if {$idx2 == -1} break
+ if {$idx2 == -1} { set idx2 [string length $line] }
# insert them
.buffer insert end [string range $line $idx1 $idx2] rawsixel
@@ 327,6 329,15 @@ proc quit {} {
exit 0
}
+proc stat {} {
+ global clients
+
+ sendl STAT
+ lassign [recvl] msgs
+ lassign [recvl] bytes
+ lassign [recvl] clients
+}
+
### ACTUAL CLIENT CODE LMAO ###
@@ 340,6 351,7 @@ proc sendmsg {msg} {
}
proc pollmsgs {} {
+ stat
skip
after 10000 pollmsgs
}
@@ 349,6 361,7 @@ proc pollmsgs {} {
set lastmsg 0
last 16
+stat
after 10000 pollmsgs
bind .foot.input <Return> [concat [bind .foot.input <Return>] ";" {