ref: e3b57b355635d151d3b092a930afd94be19df0bd
parent: fbd6c71c4a4977d706d9ee7332348b4ff1234fb2
author: qwx <qwx@sciops.net>
date: Thu Mar 24 17:44:54 EDT 2022
wircrc: cheap autoreconnect
--- a/bin/wircrc
+++ b/bin/wircrc
@@ -9,6 +9,8 @@
chans=()
realname='<nil>'
nick=$user
+latch=$*
+again=0
while (~ $1 -*) {
switch ($1) {
@@ -173,7 +175,7 @@
fn sigint {
shutdown
}
-
+echo $0 $"latch
wmk $server &
dial tcp!$server!$port $tls irc $server &
@@ -213,6 +215,7 @@
if(~ $i $id || ~ $i $id!*)
wio $i HUNGUP $id
}
+ again=1
case wnew
wd$id=$a(3)
wp$id=$a(4)
@@ -313,3 +316,5 @@
}
}
shutdown
+if(~ $again 1)
+ window -dx 162 -dy 64 $0 $"latch