Cheiron, you don't need to set a variable for the sockread as you did here:
var %t
sockread %t
; it can just be
sockread %t
.
tv3636: /tokenize is basically using bits of things (such as $sock($sockname).mark or variables), which you can turn into identifiers, such as $1, $2, $3, depending on the number of contents you have in a set. Like the name, you get the $1, $2, $3 through the token number.
So if I have
/sockmark obama $active $nick($chan,$r(1,$nick($chan,0)))
, since those two are separated by $chr(32), I can use /tokenize 32 $sock($sockname).mark to make $1 the $active, and $2 the $nick($chan,$r(1,$nick($chan,0))).