From WikiChip
Difference between revisions of "mirc/identifiers/$sockbr"
(Created page with "{{mirc title|$sockbr Identifier}}'''$sockbr''' return the number of bytes read from the last /sockread command done for that socket. == Synopsis == <pre>$sockbr</pre> == Par...") |
m |
||
Line 1: | Line 1: | ||
− | {{mirc title|$sockbr | + | {{mirc title|$sockbr identifier}}'''$sockbr''' returns the number of bytes read from the last /sockread command done for that socket. |
+ | |||
== Synopsis == | == Synopsis == | ||
<pre>$sockbr</pre> | <pre>$sockbr</pre> | ||
− | == | + | == Parameters == |
− | |||
None | None | ||
== Properties == | == Properties == | ||
− | |||
None | None | ||
== Example == | == Example == | ||
<source lang="mIRC">on *:sockread:name:{ | <source lang="mIRC">on *:sockread:name:{ | ||
− | if ($sockerr) return | + | if ($sockerr) return |
− | var %a | + | var %a |
− | ;sockread %a reads one line, or nothing | + | ;sockread %a reads one line, or nothing |
− | ;we check if we read anything before comparing | + | ;we check if we read anything before comparing |
− | if (!$sockbr) return | + | if (!$sockbr) return |
− | if (%a == something) echo -a ok | + | if (%a == something) echo -a ok |
}</source> | }</source> | ||
Line 25: | Line 24: | ||
{{mIRC compatibility|5.3}} | {{mIRC compatibility|5.3}} | ||
− | == See | + | == See also == |
− | {{mIRC|$sock}} | + | * {{mIRC|$sock}} |
− | {{mIRC|$sockname}} | + | * {{mIRC|$sockname}} |
− | {{mIRC|$sockerr}} | + | * {{mIRC|$sockerr}} |
− | [[Category: | + | {{mIRC identifier list}} |
+ | [[Category:mIRC identifiers|sockbr]] |
Latest revision as of 13:48, 22 September 2017
Commands & Identifiers
Basics
Events
Matching Tools
Data Storage
Control Structures
GUI Scripting
Sockets
Advanced Scripting
Additional Resources
Security
Other
$sockbr returns the number of bytes read from the last /sockread command done for that socket.
Synopsis[edit]
$sockbr
Parameters[edit]
None
Properties[edit]
None
Example[edit]
on *:sockread:name:{ if ($sockerr) return var %a ;sockread %a reads one line, or nothing ;we check if we read anything before comparing if (!$sockbr) return if (%a == something) echo -a ok }
Compatibility[edit]
Added: mIRC v5.3
Added on: 13 Dec 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.
See also[edit]
mIRC identifier list