(late reply)

- I used /sockmark especially to show that one may relay data to socket events with other means.
- Set -l sets local variables - they dont need any unset. That said, I usually try to avoid global variables wherever possible - especially if the data isn't required in further sessions. Global vars may persist (even with -e in case of a crash; if you forget adding an unload event etc). It depends on the situation and is a personal preference though (I like a clean vars section).
- You're right about $nohtml, I simpliy ripped the first alias I found from an existing thread, as (to my surprise) I didn't needed one in any script of mine so far.
- Of course you can trigger the output not after !$sockbr but on sockclose. However I don't see any advantage in this particular case... The $sockbr-loop is again a habbit of mine (but mandatory in some other socket situations).
- Yep, the OP could check first whether or not his variables actually hold [valid] data. However the script won't get stuck, issue invalid commands or the like without the check. And no output at all might cause more confusion than an output with missing values...
- Besides a small (and inconsequential) typo in the regex of my post, the expression could capture the data right away for a $regml(read,2) instead of using $nohtml and $remove on the whole line. That aside, the current construct can actually be improved with "$mid($nohtml(%read),$calc($len($regml(read,1)) +1))" instead of "$remove($nohtml(%read),$regml(read,1))": It won't strip "guild" out of a guild's name for example.
smile