shithub: riscv

Download patch

ref: fe13029eb4b1dbef093650cd2e0ab966e63bdab2
parent: b786ff0544385a1219fb33a39fa6f0e15f49b846
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Thu Oct 11 21:05:34 EDT 2012

ircrc: various improvements (thanks again pap!)

the -t option was ineffective. this fixes is.

fix incompatibility with 9vx as its tcp/status
file returns slightly different format than
Plan 9.

strip annoying  character from nickserv.

--- a/rc/bin/ircrc
+++ b/rc/bin/ircrc
@@ -34,6 +34,10 @@
 	echo NICK $nick > $netdir/data
 	if (~ $#pass 1)
 		echo PRIVMSG 'nickserv :'identify $"pass > $netdir/data
+	if(~ $#target 1){
+		title
+		echo JOIN $target > $netdir/data
+	}
 	while (cmd=`{read}) {
 	msg=()
 	out=()
@@ -148,7 +152,7 @@
 }
 
 fn pretty {
-	while (~ `{cat $netdir/status} Established*) {
+	while (~ `{cat $netdir/status} *Established*) {
 		line=`{read}
 		switch ($line) {
 		case *JOIN* *QUIT* *PART* *NICK*
@@ -231,6 +235,6 @@
 	netdir=`{basename -d $clonefile} ^ / ^  `{cat /fd/4}
 	echo connect $ip!$port >$netdir/ctl || exit 'cannot connect'
 	echo connected to tcp!$ip!$port on $netdir
-	cat $netdir/data | tr -d '
' | pretty & 
+	cat $netdir/data | tr -d '
' | pretty & 
 	work
 }
--