-n reads a line but won't read anything if there is not a terminated line in the buffer (a $crlf, or just $lf)
-f force the read of whatever is in the buffer so with -fn, it reads a line in priority, but if no line is found, it will still read whatever is in the buffer, so from that point, you're good, it should read everything.

Now, the on sockread event:
Originally Posted By: /help on sockread
Note: A single /sockread may not be enough to read the entire buffer. You should keep reading until $sockbr (bytes read) is set to zero. This is far faster than letting mIRC re-trigger the event. If your script does not read the whole buffer, the on sockread event is re-triggered if:

a) you were reading into a &binvar.

b) you were reading into a %var and there is still a $crlf terminated line in the buffer waiting to be read.
since you're reading into a binvar, it should always retrigger, it's hard to tell, only debugging the script would help at this point


Also, can you explain what you're doing with this?
Quote:
if ($bvar(&mybinvar,$calc($bvar(&mybinvar,0) - 1),1) == 0) {
.bwrite $script $+ .tmp -1 $calc($bvar(&mybinvar,0) - 2) &mybinvar
.bwrite $script $+ .tmp -1 -1 $crlf
}
else {
.bwrite $script $+ .tmp -1 $bvar(&mybinvar,0) &mybinvar
}

Last edited by Wims; 29/11/15 03:42 PM.

#mircscripting @ irc.swiftirc.net == the best mIRC help channel