Sockwrite

From Scriptwiki
Revision as of 19:26, 30 January 2011 by Vliedel (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

/sockwrite [-tnb] <name> [numbytes] <text|%var|&binvar>

The /sockwrite command queues info to be sent on the specified connection. mIRC will then try to send that info as quickly as it can. Once it has finished sending the info, it triggers the on sockwrite event so you can send more info if you need to.

-t Forces mIRC to send anything beginning with a & as normal text instead of interpreting it as a binary variable.
-n Appends a $crlf to the line being sent if it's not a &binvar and if it doesn't already have a $crlf.
-b Indicates that you are specifying the numbytes value which is the number of bytes you want sent.

Note: You can use a wildcard name to send the same information at once to all connections that match the wildcard.
On error: if a /sockwrite fails, it sets $sock().wserr to the error value, and triggers the on sockwrite event with $sockerr set.

See also