This seems like a reasonable idea to me. The biggest advantage that I see is that your script wouldn't have to store identifiers into variables so that they can be accessed in the on SOCK* events. For example, this:
on *:TEXT:!points:#:{
set %nick $nick
set %chan $chan
sockopen points www.points.com 80
}
on *:SOCKOPEN:points:{
sockwrite -n $sockname points.php?n=%nick&c=%chan http 1.1
;etc
}
on *:SOCKREAD:points:{
sockread %s
if (%s == something) { msg %chan %nick has $4 points }
unset %chan
unset %nick
}
(not real code)
could become this:
on *:TEXT:!points:#:{
sopen 100 points www.points.com 80
if (!$sopen(points)) return
swrite -n points points.php?n=$nick&c=$chan http 1.1
if ($sfail(points)) return
while (!$sread(points).feof) {
if ($sread(points) == something) msg $chan $nick has $4 points
}
sclose points
}
It would be meant for the simplest sockets only. More complex ones would still be able to use the regular non-blocking sockets and events.
-genius_at_work