Added in 1.9.0
/sockread [-fn] [numbytes] <%var|&binvar>
Reads bytes from the receive buffer into the specified variable.
If you specify a %var variable, a line of text ending with a Carriage Return/LineFeed is read into %var. The $crlf are stripped off (this may result in %var being $null if the line only consisted of $crlf).
If you specify a &binvar then [numbytes] of info is read into the binary variable. If no [numbytes] is specified it defaults to 4096 bytes.
-f - Forces AdiIRC to fill the %var variable with whatever text is in the receive buffer, even if it does not end in a $crlf.
-n - allows you to read a $crlf terminated line into a &binvar. If the incoming line does not contain a $crlf, no bytes will be read into &binvar, unless you specify the -f switch, which forces the read (same as when reading into %vars).
[numbytes] - Number of bytes to read into &binvar.
<%var|&binvar> - %var or &binvar to read the data into.
Updated by Per Amundsen over 4 years ago · 1 revisions