Oh ok I see what you're saying now something along the lines of...
on *:SOCKREAD:*:{
;read the data and whatever...
if ($1 == whatever) { sockwrite -tn $sockname blahdeblah | sockmark $sockname close }
elseif ($1 == blahdeblah) { sockwrite -tn $sockname whatever | sockmark $sockname dontclose }
}
on *:SOCKWRITE:*:{
if ($sock($sockname).mark == close) { sockclose $sockname }
elseif ($sock($sockname).mark == dontclose) { $nextaction }
}
That makes sense now. Sorry, was just a bit frustrated that it worked before but it doesn't anymore.