No-- you should loop-- this does not go against the help file.

but you should realize that if you /sockread 4096 bytes (the default for a binvar) you will exhaust the buffer and there will never be anything left to read...

so you can and *should* loop, but realize that if you're reading the default binvar size it will probably never actually iterate more than once-- you might want to keep the loop code though, just in case you change the read size down from 4096 in the future for some reason.

Code:
while ($true) {
  sockread &bvar
  if ($sockbr == 0) break
}


You'll see that only triggers once, but if you change the numbytes param on /sockread:

Code:
while ($true) {
  sockread 1024 &bvar
  if ($sockbr == 0) break
}


It would iterate ~4 times (for a full buffer).


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"