<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://script.quakenet.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zyberdog</id>
	<title>Scriptwiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://script.quakenet.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zyberdog"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/Special:Contributions/Zyberdog"/>
	<updated>2026-05-14T15:10:35Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=File:Mouse.png&amp;diff=4597</id>
		<title>File:Mouse.png</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=File:Mouse.png&amp;diff=4597"/>
		<updated>2007-01-31T08:01:06Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: Shows the different areas the $mouse identifier properties, .x/.y .dx/.dy and .mx/.my represent.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Shows the different areas the $mouse identifier properties, .x/.y .dx/.dy and .mx/.my represent.&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Multi-server&amp;diff=1955</id>
		<title>Category:Multi-server</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:Multi-server&amp;diff=1955"/>
		<updated>2006-05-07T14:33:46Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added parent category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Explanation ==&lt;br /&gt;
&lt;br /&gt;
mIRC allows you to connect to more than one IRC server at a time. This means that scripts need to be multi-server aware in order to behave correctly when a user is connected to more than one server. The following commands and identifiers allow a script to handle multiple server connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Every connection has a connection id value (cid). So you can either specify a connection using this cid or using the connection number (con).&lt;br /&gt;
&lt;br /&gt;
So each window that is created, such as a channel or query window, is associated with the connection id of the server where that window was opened.&lt;br /&gt;
&lt;br /&gt;
=== Commands ===&lt;br /&gt;
Scripts can be made to perform commands on a specific server connection by using the [[Scon|/scon]] or [[Scid|/scid]] commands.&lt;br /&gt;
&lt;br /&gt;
=== Identifiers ===&lt;br /&gt;
To receive the server connection id for the current script, you have to use [[$cid]]. Using [[$scid]] (or [[$scon]]), you can get the connection id and the value of identifiers (custom ones too) for this special connection (e.g. [[$me]] has other values for each connection probably).&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 ; lets make a new alias showing the time we are connected to all currently connected servers.&lt;br /&gt;
 [[alias]] showuptimes {&lt;br /&gt;
  [[var]] %i = 1&lt;br /&gt;
  ; we loop through all connections&lt;br /&gt;
  [[while]] ([[$scon]](%i)) {&lt;br /&gt;
   ; switch to that connection id ($scon(N) returns the cid)&lt;br /&gt;
   [[Scid|scid]] $scon(%i)&lt;br /&gt;
    ; from here onwards, the values of the identifiers are &lt;br /&gt;
    ; the ones from the cid we just switched to.&lt;br /&gt;
    ; lets echo the server and how long we&#039;re connected to &lt;br /&gt;
    [[echo]] -a $server $uptime(server,2)&lt;br /&gt;
    ; increase the looping-variable&lt;br /&gt;
    [[inc]] %i&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:MIRC]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Members&amp;diff=1411</id>
		<title>Category:Members</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:Members&amp;diff=1411"/>
		<updated>2006-05-04T04:00:00Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: moved doomie up as admin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Wiki Admins ==&lt;br /&gt;
&lt;br /&gt;
* [[User:BlackShroud|BlackShroud]]&lt;br /&gt;
* [[User:Doomie|Doomie]]&lt;br /&gt;
* [[User:Kr3L1S|Kr3L1S]]&lt;br /&gt;
* [[User:Microbe|Microbe]]&lt;br /&gt;
* [[User:Saturn|Saturn]]&lt;br /&gt;
* [[User:Tovrleaf|Tovrleaf]]&lt;br /&gt;
* [[User:Voronoi|Voronoi]]&lt;br /&gt;
* [[User:wiebe|wiebe]]&lt;br /&gt;
* [[User:Zyberdog|Zyberdog]]&lt;br /&gt;
&lt;br /&gt;
== Wiki Editors ==&lt;br /&gt;
&lt;br /&gt;
* [[User:Albie|Albie]]&lt;br /&gt;
* [[User:Shenghi|Shenghi]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1391</id>
		<title>How to query a CS Server</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1391"/>
		<updated>2006-04-25T15:29:02Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added wikilinks and some missing indenting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to e.g. get the umber and names of all player who are currently playing on a CS-server, you have to send a so-called &amp;quot;query&amp;quot; to this server (using UDP) and handle everything the server sends back to you. This isn&#039;t as easy as it sounds. At first, you would have to &#039;learn&#039;, or, at least, understand the protocol a CS-server uses (e.g. what do I have to send to the server to get a &#039;good&#039; reply and what&#039;s the structure of this reply). If you want to learn more about these protocols, take a look at http://dev.kquery.com/ or http://www.valve-erc.com/srcsdk/Code/Networking/serverqueries.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following script &#039;&#039;&#039;echo&#039;&#039;&#039;s the output to your active window. You will have to modify it to be able to use it as &#039;bot&#039;. It&#039;s a more complex script and you don&#039;t need to understand it (completly) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 ; HL server query snippet by Saturn&lt;br /&gt;
 ;&lt;br /&gt;
 ; usage:&lt;br /&gt;
 ; /hlinfo &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 ; /hlplay &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens a new socket if you want to get general information about a running CS-server&lt;br /&gt;
 [[alias]] hlinfo {&lt;br /&gt;
   ; using a dynamic socket name so we can use multiple instances at once&lt;br /&gt;
   [[var]] %sock = $+(hlinfo-,[[$ticks]])&lt;br /&gt;
   ; actually open the socket&lt;br /&gt;
   [[sockudp]] -k %sock [[$1]]-2 [[$str]]([[$chr]](255),4) [[DollarPlus|$+]] TSource Engine Query&lt;br /&gt;
   ; closing the socket after 60seconds if there is no response (else it will be closed by another event (see below))&lt;br /&gt;
   .[[timer]] $+ %sock 1 60 [[sockclose]] %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will get all data send back from the server&lt;br /&gt;
 [[on_udpread|on *:UDPREAD]]:hlinfo-*:{&lt;br /&gt;
   ; save it in a binary variable&lt;br /&gt;
   [[sockread]] -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
   ; set some local variables that we will use below&lt;br /&gt;
   var %offset, %name, %map, %game, %num, %max, %ip, %dir&lt;br /&gt;
  &lt;br /&gt;
   ; following the protocol, this &amp;quot;m&amp;quot; shows us that we did query a Half-Life 1 server&lt;br /&gt;
   if ($chr([[$bvar]](&amp;amp;reply,5)) == m) {&lt;br /&gt;
     ; Half-Life 1 info reply&lt;br /&gt;
     &lt;br /&gt;
     %offset = 6&lt;br /&gt;
  &lt;br /&gt;
     ; saving the ip&lt;br /&gt;
     %ip = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     [[inc]] %offset [[$calc]]([[$len]](%ip) + 1)&lt;br /&gt;
    &lt;br /&gt;
     ; the same&lt;br /&gt;
     %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
     ; the current map&lt;br /&gt;
     %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
     ; the game directory&lt;br /&gt;
     %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
     ; the name of the game&lt;br /&gt;
     %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
     ; current and maximum players&lt;br /&gt;
     %num = $bvar(&amp;amp;reply,%offset)&lt;br /&gt;
     %max = $bvar(&amp;amp;reply,$calc(%offset + 1))&lt;br /&gt;
   }&lt;br /&gt;
   ; else we get data for a CS:Source game&lt;br /&gt;
   else {&lt;br /&gt;
     ; Source info reply&lt;br /&gt;
     ; we do the same as above&lt;br /&gt;
     %offset = 7&lt;br /&gt;
 &lt;br /&gt;
     %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
     %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
     %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
     %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
     %num = $bvar(&amp;amp;reply,$calc(%offset + 2))&lt;br /&gt;
     %max = $bvar(&amp;amp;reply,$calc(%offset + 3))&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   ; now we echo all stored details to the active window&lt;br /&gt;
   [[echo]] -a Info for [[$sock]]([[$sockname]]).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
   echo -a Name: %name&lt;br /&gt;
   echo -a Map: %map&lt;br /&gt;
   echo -a Game: %game&lt;br /&gt;
   echo -a Players: %num $+ / $+ %max&lt;br /&gt;
   &lt;br /&gt;
   ; and turn the timer to close the socket off&lt;br /&gt;
   .timer $+ $sockname off&lt;br /&gt;
   ; as we can close it manually now&lt;br /&gt;
   sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias that will be called from hlplay to open the socket &lt;br /&gt;
 alias hlchal {&lt;br /&gt;
   ; $1 = ip, $2 = port, $3- = what to call when received&lt;br /&gt;
   ; use dynamic socket name as above&lt;br /&gt;
   var %sock = $+(hlchal-,$ticks)&lt;br /&gt;
   ; open the socket&lt;br /&gt;
   sockudp -k %sock $1-2 $str($chr(255),4) $+ W &lt;br /&gt;
   ; mark it with the ip and port (and the query we want to call when we&#039;ve received something from the server&lt;br /&gt;
   [[sockmark]] %sock $3- $1-2&lt;br /&gt;
   ; and make a new timer to close it after 60 seconds&lt;br /&gt;
   .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; read everything that comes back from the hlchal-* query&lt;br /&gt;
 on *:UDPREAD:hlchal-*:{&lt;br /&gt;
   ; and save it in the binary variable called &amp;amp;reply&lt;br /&gt;
   sockread -f &amp;amp;reply&lt;br /&gt;
   ; actually call the alias saved in the sockmark (hlplay_query)&lt;br /&gt;
   $sock($sockname).mark $bvar(&amp;amp;reply,6,4)&lt;br /&gt;
   ; and turn the timer off because we can close it manually&lt;br /&gt;
   .timer $+ $sockname off&lt;br /&gt;
   sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias we can call to make everything easier &lt;br /&gt;
 ; it will call other aliases to open sockets etc.&lt;br /&gt;
 alias hlplay {&lt;br /&gt;
   hlchal $1-2 hlplay_query&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens the _real_ socket to receive data (everything before was just to challenge the server (read the website mentioned above)&lt;br /&gt;
 alias hlplay_query {&lt;br /&gt;
   ; set a binary variable&lt;br /&gt;
   bset &amp;amp;query 1 255 255 255 255 85 $3-&lt;br /&gt;
   ; use dynamic socket names again&lt;br /&gt;
   var %sock = $+(hlplay-,$ticks)&lt;br /&gt;
   ; open the socket&lt;br /&gt;
   sockudp -k %sock $1-2 &amp;amp;query&lt;br /&gt;
   ; and turn the alias to close the socket after 60seconds on&lt;br /&gt;
   .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will receive all data from the server as response to out query&lt;br /&gt;
 on *:UDPREAD:hlplay-*:{&lt;br /&gt;
   ; we save it in &amp;amp;reply&lt;br /&gt;
   sockread -f &amp;amp;reply&lt;br /&gt;
  &lt;br /&gt;
   ; set some local variables we will use later&lt;br /&gt;
   var %i = 1, %num = $bvar(&amp;amp;reply,6), %offset = 7&lt;br /&gt;
   var %count = 0, %name, %kills&lt;br /&gt;
 &lt;br /&gt;
   ; and echo the number of players&lt;br /&gt;
   echo -a Players on $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
 &lt;br /&gt;
   ; now we can loop through all player and save some details about them&lt;br /&gt;
   [[while]] (%i [[If-Then-Else#&amp;lt;=|&amp;lt;=]] %num) {&lt;br /&gt;
     inc %offset&lt;br /&gt;
   &lt;br /&gt;
     ; the name&lt;br /&gt;
     %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
     inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
     ; the kills&lt;br /&gt;
     %kills = $bvar(&amp;amp;reply,%offset).long&lt;br /&gt;
     [[If-Then-Else|if]] ([[$isbit]](%kills,32)) [[dec]] %kills $calc(2^32)&lt;br /&gt;
     inc %offset 8&lt;br /&gt;
 &lt;br /&gt;
     ; and if there was a player&lt;br /&gt;
     if (%name [[If-Then-Else#!=|!=]] [[$null]]) {&lt;br /&gt;
       ; increase the variable that shows us the number of the player&lt;br /&gt;
       inc %count&lt;br /&gt;
       ; and echo it to the active window with the kills saved above&lt;br /&gt;
       echo -a %count $+ . %name - %kills&lt;br /&gt;
     }&lt;br /&gt;
  &lt;br /&gt;
     ; increase %i so we go on with the next player&lt;br /&gt;
     inc %i&lt;br /&gt;
   }&lt;br /&gt;
  &lt;br /&gt;
   ; if there are no players online, echo is aswell&lt;br /&gt;
   if (%count [[If-Then-Else#==|==]] 0) echo -a No players found!&lt;br /&gt;
 &lt;br /&gt;
   ; turn off the timer&lt;br /&gt;
   .timer $+ $sockname off&lt;br /&gt;
   ; and close the socket manually&lt;br /&gt;
   sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Socket]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1390</id>
		<title>How to query a CS Server</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1390"/>
		<updated>2006-04-24T18:18:00Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added socket category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to e.g. get the umber and names of all player who are currently playing on a CS-server, you have to send a so-called &amp;quot;query&amp;quot; to this server (using UDP) and handle everything the server sends back to you. This isn&#039;t as easy as it sounds. At first, you would have to &#039;learn&#039;, or, at least, understand the protocol a CS-server uses (e.g. what do I have to send to the server to get a &#039;good&#039; reply and what&#039;s the structure of this reply). If you want to learn more about these protocols, take a look at http://dev.kquery.com/ or http://www.valve-erc.com/srcsdk/Code/Networking/serverqueries.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following script &#039;&#039;&#039;echo&#039;&#039;&#039;s the output to your active window. You will have to modify it to be able to use it as &#039;bot&#039;. It&#039;s a more complex script and you don&#039;t need to understand it (completly) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 ; HL server query snippet by Saturn&lt;br /&gt;
 ;&lt;br /&gt;
 ; usage:&lt;br /&gt;
 ; /hlinfo &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 ; /hlplay &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens a new socket if you want to get general information about a running CS-server&lt;br /&gt;
 [[alias]] hlinfo {&lt;br /&gt;
  ; using a dynamic socket name so we can use multiple instances at once&lt;br /&gt;
  [[var]] %sock = $+(hlinfo-,$ticks)&lt;br /&gt;
  ; actually open the socket&lt;br /&gt;
  [[sockudp]] -k %sock [[$1]]-2 [[$str]]([[$chr]](255),4) [[DollarPlus|$+]] TSource Engine Query&lt;br /&gt;
  ; closing the socket after 60seconds if there is no response (else it will be closed by another event (see below))&lt;br /&gt;
  .[[timer]] $+ %sock 1 60 [[sockclose]] %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will get all data send back from the server&lt;br /&gt;
 on *:udpread:hlinfo-*:{&lt;br /&gt;
  ; save it in a binary variable&lt;br /&gt;
  [[sockread]] -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables that we will use below&lt;br /&gt;
  var %offset, %name, %map, %game, %num, %max, %ip, %dir&lt;br /&gt;
  &lt;br /&gt;
  ; following the protocol, this &amp;quot;m&amp;quot; shows us that we did query a Half-Life 1 server&lt;br /&gt;
  if ($chr($bvar(&amp;amp;reply,5)) == m) {&lt;br /&gt;
    ; Half-Life 1 info reply&lt;br /&gt;
    &lt;br /&gt;
    %offset = 6&lt;br /&gt;
  &lt;br /&gt;
    ; saving the ip&lt;br /&gt;
    %ip = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%ip) + 1)&lt;br /&gt;
    &lt;br /&gt;
    ; the same&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the current map&lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the game directory&lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the name of the game&lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; current and maximum players&lt;br /&gt;
    %num = $bvar(&amp;amp;reply,%offset)&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 1))&lt;br /&gt;
  }&lt;br /&gt;
  ; else we get data for a CS:Source game&lt;br /&gt;
  else {&lt;br /&gt;
    ; Source info reply&lt;br /&gt;
    ; we do the same as above&lt;br /&gt;
    %offset = 7&lt;br /&gt;
 &lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %num = $bvar(&amp;amp;reply,$calc(%offset + 2))&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 3))&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; now we echo all stored details to the active window&lt;br /&gt;
  echo -a Info for $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
  echo -a Name: %name&lt;br /&gt;
  echo -a Map: %map&lt;br /&gt;
  echo -a Game: %game&lt;br /&gt;
  echo -a Players: %num $+ / $+ %max&lt;br /&gt;
  &lt;br /&gt;
  ; and turn the timer to close the socket off&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; as we can close it manually now&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias that will be called from hlplay to open the socket &lt;br /&gt;
 alias hlchal {&lt;br /&gt;
  ; $1 = ip, $2 = port, $3- = what to call when received&lt;br /&gt;
  ; use dynamic socket name as above&lt;br /&gt;
  var %sock = $+(hlchal-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 $str($chr(255),4) $+ W &lt;br /&gt;
  ; mark it with the ip and port (and the query we want to call when we&#039;ve received something from the server&lt;br /&gt;
  sockmark %sock $3- $1-2&lt;br /&gt;
  ; and make a new timer to close it after 60 seconds&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; read everything that comes back from the hlchal-* query&lt;br /&gt;
 on *:UDPREAD:hlchal-*:{&lt;br /&gt;
  ; and save it in the binary variable called &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
  ; actually call the alias saved in the sockmark (hlplay_query)&lt;br /&gt;
  $sock($sockname).mark $bvar(&amp;amp;reply,6,4)&lt;br /&gt;
  ; and turn the timer off because we can close it manually&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias we can call to make everything easier &lt;br /&gt;
 ; it will call other aliases to open sockets etc.&lt;br /&gt;
 alias hlplay {&lt;br /&gt;
  hlchal $1-2 hlplay_query&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens the _real_ socket to receive data (everything before was just to challenge the server (read the website mentioned above)&lt;br /&gt;
 alias hlplay_query {&lt;br /&gt;
  ; set a binary variable&lt;br /&gt;
  bset &amp;amp;query 1 255 255 255 255 85 $3-&lt;br /&gt;
  ; use dynamic socket names again&lt;br /&gt;
  var %sock = $+(hlplay-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 &amp;amp;query&lt;br /&gt;
  ; and turn the alias to close the socket after 60seconds on&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will receive all data from the server as response to out query&lt;br /&gt;
 on *:UDPREAD:hlplay-*:{&lt;br /&gt;
  ; we save it in &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables we will use later&lt;br /&gt;
  var %i = 1, %num = $bvar(&amp;amp;reply,6), %offset = 7&lt;br /&gt;
  var %count = 0, %name, %kills&lt;br /&gt;
 &lt;br /&gt;
  ; and echo the number of players&lt;br /&gt;
  echo -a Players on $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
 &lt;br /&gt;
  ; now we can loop through all player and save some details about them&lt;br /&gt;
  while (%i &amp;lt;= %num) {&lt;br /&gt;
    inc %offset&lt;br /&gt;
   &lt;br /&gt;
    ; the name&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the kills&lt;br /&gt;
    %kills = $bvar(&amp;amp;reply,%offset).long&lt;br /&gt;
    if ($isbit(%kills,32)) dec %kills $calc(2^32)&lt;br /&gt;
    inc %offset 8&lt;br /&gt;
 &lt;br /&gt;
    ; and if there was a player&lt;br /&gt;
    if (%name != $null) {&lt;br /&gt;
      ; increase the variable that shows us the number of the player&lt;br /&gt;
      inc %count&lt;br /&gt;
      ; and echo it to the active window with the kills saved above&lt;br /&gt;
      echo -a %count $+ . %name - %kills&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    ; increase %i so we go on with the next player&lt;br /&gt;
    inc %i&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; if there are no players online, echo is aswell&lt;br /&gt;
  if (%count == 0) echo -a No players found!&lt;br /&gt;
 &lt;br /&gt;
  ; turn off the timer&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; and close the socket manually&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
[[Category:Socket]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1378</id>
		<title>How to query a CS Server</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1378"/>
		<updated>2006-04-24T18:17:25Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: fix&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to e.g. get the umber and names of all player who are currently playing on a CS-server, you have to send a so-called &amp;quot;query&amp;quot; to this server (using UDP) and handle everything the server sends back to you. This isn&#039;t as easy as it sounds. At first, you would have to &#039;learn&#039;, or, at least, understand the protocol a CS-server uses (e.g. what do I have to send to the server to get a &#039;good&#039; reply and what&#039;s the structure of this reply). If you want to learn more about these protocols, take a look at http://dev.kquery.com/ or http://www.valve-erc.com/srcsdk/Code/Networking/serverqueries.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following script &#039;&#039;&#039;echo&#039;&#039;&#039;s the output to your active window. You will have to modify it to be able to use it as &#039;bot&#039;. It&#039;s a more complex script and you don&#039;t need to understand it (completly) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 ; HL server query snippet by Saturn&lt;br /&gt;
 ;&lt;br /&gt;
 ; usage:&lt;br /&gt;
 ; /hlinfo &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 ; /hlplay &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens a new socket if you want to get general information about a running CS-server&lt;br /&gt;
 [[alias]] hlinfo {&lt;br /&gt;
  ; using a dynamic socket name so we can use multiple instances at once&lt;br /&gt;
  [[var]] %sock = $+(hlinfo-,$ticks)&lt;br /&gt;
  ; actually open the socket&lt;br /&gt;
  [[sockudp]] -k %sock [[$1]]-2 [[$str]]([[$chr]](255),4) [[DollarPlus|$+]] TSource Engine Query&lt;br /&gt;
  ; closing the socket after 60seconds if there is no response (else it will be closed by another event (see below))&lt;br /&gt;
  .[[timer]] $+ %sock 1 60 [[sockclose]] %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will get all data send back from the server&lt;br /&gt;
 on *:udpread:hlinfo-*:{&lt;br /&gt;
  ; save it in a binary variable&lt;br /&gt;
  [[sockread]] -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables that we will use below&lt;br /&gt;
  var %offset, %name, %map, %game, %num, %max, %ip, %dir&lt;br /&gt;
  &lt;br /&gt;
  ; following the protocol, this &amp;quot;m&amp;quot; shows us that we did query a Half-Life 1 server&lt;br /&gt;
  if ($chr($bvar(&amp;amp;reply,5)) == m) {&lt;br /&gt;
    ; Half-Life 1 info reply&lt;br /&gt;
    &lt;br /&gt;
    %offset = 6&lt;br /&gt;
  &lt;br /&gt;
    ; saving the ip&lt;br /&gt;
    %ip = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%ip) + 1)&lt;br /&gt;
    &lt;br /&gt;
    ; the same&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the current map&lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the game directory&lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the name of the game&lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; current and maximum players&lt;br /&gt;
    %num = $bvar(&amp;amp;reply,%offset)&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 1))&lt;br /&gt;
  }&lt;br /&gt;
  ; else we get data for a CS:Source game&lt;br /&gt;
  else {&lt;br /&gt;
    ; Source info reply&lt;br /&gt;
    ; we do the same as above&lt;br /&gt;
    %offset = 7&lt;br /&gt;
 &lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %num = $bvar(&amp;amp;reply,$calc(%offset + 2))&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 3))&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; now we echo all stored details to the active window&lt;br /&gt;
  echo -a Info for $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
  echo -a Name: %name&lt;br /&gt;
  echo -a Map: %map&lt;br /&gt;
  echo -a Game: %game&lt;br /&gt;
  echo -a Players: %num $+ / $+ %max&lt;br /&gt;
  &lt;br /&gt;
  ; and turn the timer to close the socket off&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; as we can close it manually now&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias that will be called from hlplay to open the socket &lt;br /&gt;
 alias hlchal {&lt;br /&gt;
  ; $1 = ip, $2 = port, $3- = what to call when received&lt;br /&gt;
  ; use dynamic socket name as above&lt;br /&gt;
  var %sock = $+(hlchal-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 $str($chr(255),4) $+ W &lt;br /&gt;
  ; mark it with the ip and port (and the query we want to call when we&#039;ve received something from the server&lt;br /&gt;
  sockmark %sock $3- $1-2&lt;br /&gt;
  ; and make a new timer to close it after 60 seconds&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; read everything that comes back from the hlchal-* query&lt;br /&gt;
 on *:UDPREAD:hlchal-*:{&lt;br /&gt;
  ; and save it in the binary variable called &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
  ; actually call the alias saved in the sockmark (hlplay_query)&lt;br /&gt;
  $sock($sockname).mark $bvar(&amp;amp;reply,6,4)&lt;br /&gt;
  ; and turn the timer off because we can close it manually&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias we can call to make everything easier &lt;br /&gt;
 ; it will call other aliases to open sockets etc.&lt;br /&gt;
 alias hlplay {&lt;br /&gt;
  hlchal $1-2 hlplay_query&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens the _real_ socket to receive data (everything before was just to challenge the server (read the website mentioned above)&lt;br /&gt;
 alias hlplay_query {&lt;br /&gt;
  ; set a binary variable&lt;br /&gt;
  bset &amp;amp;query 1 255 255 255 255 85 $3-&lt;br /&gt;
  ; use dynamic socket names again&lt;br /&gt;
  var %sock = $+(hlplay-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 &amp;amp;query&lt;br /&gt;
  ; and turn the alias to close the socket after 60seconds on&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will receive all data from the server as response to out query&lt;br /&gt;
 on *:UDPREAD:hlplay-*:{&lt;br /&gt;
  ; we save it in &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables we will use later&lt;br /&gt;
  var %i = 1, %num = $bvar(&amp;amp;reply,6), %offset = 7&lt;br /&gt;
  var %count = 0, %name, %kills&lt;br /&gt;
 &lt;br /&gt;
  ; and echo the number of players&lt;br /&gt;
  echo -a Players on $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
 &lt;br /&gt;
  ; now we can loop through all player and save some details about them&lt;br /&gt;
  while (%i &amp;lt;= %num) {&lt;br /&gt;
    inc %offset&lt;br /&gt;
   &lt;br /&gt;
    ; the name&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the kills&lt;br /&gt;
    %kills = $bvar(&amp;amp;reply,%offset).long&lt;br /&gt;
    if ($isbit(%kills,32)) dec %kills $calc(2^32)&lt;br /&gt;
    inc %offset 8&lt;br /&gt;
 &lt;br /&gt;
    ; and if there was a player&lt;br /&gt;
    if (%name != $null) {&lt;br /&gt;
      ; increase the variable that shows us the number of the player&lt;br /&gt;
      inc %count&lt;br /&gt;
      ; and echo it to the active window with the kills saved above&lt;br /&gt;
      echo -a %count $+ . %name - %kills&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    ; increase %i so we go on with the next player&lt;br /&gt;
    inc %i&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; if there are no players online, echo is aswell&lt;br /&gt;
  if (%count == 0) echo -a No players found!&lt;br /&gt;
 &lt;br /&gt;
  ; turn off the timer&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; and close the socket manually&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1377</id>
		<title>How to query a CS Server</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=1377"/>
		<updated>2006-04-24T18:16:20Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to e.g. get the umber and names of all player who are currently playing on a CS-server, you have to send a so-called &amp;quot;query&amp;quot; to this server (using UDP) and handle everything the server sends back to you. This isn&#039;t as easy as it sounds. At first, you would have to &#039;learn&#039;, or, at least, understand the protocol a CS-server uses (e.g. what do I have to send to the server to get a &#039;good&#039; reply and what&#039;s the structure of this reply). If you want to learn more about these protocols, take a look at http://dev.kquery.com/ or http://www.valve-erc.com/srcsdk/Code/Networking/serverqueries.html.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following script &#039;&#039;&#039;echo&#039;&#039;&#039;s the output to your active window. You will have to modify it to be able to use it as &#039;bot&#039;. It&#039;s a more complex script and you don&#039;t need to understand it (completly) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 ; HL server query snippet by Saturn&lt;br /&gt;
 ;&lt;br /&gt;
 ; usage:&lt;br /&gt;
 ; /hlinfo &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 ; /hlplay &amp;lt;ip&amp;gt; &amp;lt;port&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens a new socket if you want to get general information about a running CS-server&lt;br /&gt;
 [[alias]] hlinfo {&lt;br /&gt;
  ; using a dynamic socket name so we can use multiple instances at once&lt;br /&gt;
  [[var]] %sock = $+(hlinfo-,$ticks)&lt;br /&gt;
  ; actually open the socket&lt;br /&gt;
  [[sockudp]] -k %sock [[$1]]-2 [[$str]]([[$chr]](255),4) [[DollarPlus|$+]] TSource Engine Query&lt;br /&gt;
  ; closing the socket after 60seconds if there is no response (else it will be closed by another event (see below))&lt;br /&gt;
  .[[timer]] $+ %sock 1 60 [[sockclose]] %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will get all data send back from the server&lt;br /&gt;
 on *:udpread:hlinfo-*:{&lt;br /&gt;
  ; save it in a binary variable&lt;br /&gt;
  [[sockread]] -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables that we will use below&lt;br /&gt;
  var %offset, %name, %map, %game, %num, %max, %ip, %dir&lt;br /&gt;
  &lt;br /&gt;
  ; following the protocol, this &amp;quot;m&amp;quot; shows us that we did query a Half-Life 1 server&lt;br /&gt;
  if ($chr($bvar(&amp;amp;reply,5)) == m) {&lt;br /&gt;
    ; Half-Life 1 info reply&lt;br /&gt;
    &lt;br /&gt;
    %offset = 6&lt;br /&gt;
  &lt;br /&gt;
    ; saving the ip&lt;br /&gt;
    %ip = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%ip) + 1)&lt;br /&gt;
    &lt;br /&gt;
    ; the same&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the current map&lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the game directory&lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the name of the game&lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; current and maximum players&lt;br /&gt;
    %num = $bvar(&amp;amp;reply,%offset)&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 1))&lt;br /&gt;
  }&lt;br /&gt;
  ; else we get data for a CS:Source game&lt;br /&gt;
  else {&lt;br /&gt;
    ; Source info reply&lt;br /&gt;
    ; we do the same as above&lt;br /&gt;
    %offset = 7&lt;br /&gt;
 &lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %map = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%map) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %dir = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%dir) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %game = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%game) + 1)&lt;br /&gt;
 &lt;br /&gt;
    %num = $bvar(&amp;amp;reply,$calc(%offset + 2))&lt;br /&gt;
    %max = $bvar(&amp;amp;reply,$calc(%offset + 3))&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; now we echo all stored details to the active window&lt;br /&gt;
  echo -a Info for $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
  echo -a Name: %name&lt;br /&gt;
  echo -a Map: %map&lt;br /&gt;
  echo -a Game: %game&lt;br /&gt;
  echo -a Players: %num $+ / $+ %max&lt;br /&gt;
  &lt;br /&gt;
  ; and turn the timer to close the socket off&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; as we can close it manually now&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias that will be called from hlplay to open the socket &lt;br /&gt;
 alias hlchal {&lt;br /&gt;
  ; $1 = ip, $2 = port, $3- = what to call when received&lt;br /&gt;
  ; use dynamic socket name as above&lt;br /&gt;
  var %sock = $+(hlchal-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 $str($chr(255),4) $+ W &lt;br /&gt;
  ; mark it with the ip and port (and the query we want to call when we&#039;ve received something from the server&lt;br /&gt;
  sockmark %sock $3- $1-2&lt;br /&gt;
  ; and make a new timer to close it after 60 seconds&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; read everything that comes back from the hlchal-* query&lt;br /&gt;
 on *:UDPREAD:hlchal-*:{&lt;br /&gt;
  ; and save it in the binary variable called &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
  ; actually call the alias saved in the sockmark (hlplay_query)&lt;br /&gt;
  $sock($sockname).mark $bvar(&amp;amp;reply,6,4)&lt;br /&gt;
  ; and turn the timer off because we can close it manually&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias we can call to make everything easier &lt;br /&gt;
 ; it will call other aliases to open sockets etc.&lt;br /&gt;
 alias hlplay {&lt;br /&gt;
  hlchal $1-2 hlplay_query&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; the alias that opens the _real_ socket to receive data (everything before was just to challenge the server (read the website mentioned above)&lt;br /&gt;
 alias hlplay_query {&lt;br /&gt;
  ; set a binary variable&lt;br /&gt;
  bset &amp;amp;query 1 255 255 255 255 85 $3-&lt;br /&gt;
  ; use dynamic socket names again&lt;br /&gt;
  var %sock = $+(hlplay-,$ticks)&lt;br /&gt;
  ; open the socket&lt;br /&gt;
  sockudp -k %sock $1-2 &amp;amp;query&lt;br /&gt;
  ; and turn the alias to close the socket after 60seconds on&lt;br /&gt;
  .timer $+ %sock 1 60 sockclose %sock&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will receive all data from the server as response to out query&lt;br /&gt;
 on *:UDPREAD:hlplay-*:{&lt;br /&gt;
  ; we save it in &amp;amp;reply&lt;br /&gt;
  sockread -f &amp;amp;reply&lt;br /&gt;
 &lt;br /&gt;
  ; set some local variables we will use later&lt;br /&gt;
  var %i = 1, %num = $bvar(&amp;amp;reply,6), %offset = 7&lt;br /&gt;
  var %count = 0, %name, %kills&lt;br /&gt;
 &lt;br /&gt;
  ; and echo the number of players&lt;br /&gt;
  echo -a Players on $sock($sockname).saddr $+ : $+ $sock($sockname).sport&lt;br /&gt;
 &lt;br /&gt;
  ; now we can loop through all player and save some details about them&lt;br /&gt;
  while (%i &amp;lt;= %num) {&lt;br /&gt;
    inc %offset&lt;br /&gt;
   &lt;br /&gt;
    ; the name&lt;br /&gt;
    %name = $bvar(&amp;amp;reply,%offset,128).text&lt;br /&gt;
    inc %offset $calc($len(%name) + 1)&lt;br /&gt;
 &lt;br /&gt;
    ; the kills&lt;br /&gt;
    %kills = $bvar(&amp;amp;reply,%offset).long&lt;br /&gt;
    if ($isbit(%kills,32)) dec %kills $calc(2^32)&lt;br /&gt;
    inc %offset 8&lt;br /&gt;
 &lt;br /&gt;
    ; and if there was a player&lt;br /&gt;
    if (%name != $null) {&lt;br /&gt;
      ; increase the variable that shows us the number of the player&lt;br /&gt;
      inc %count&lt;br /&gt;
      ; and echo it to the active window with the kills saved above&lt;br /&gt;
      echo -a %count $+ . %name - %kills&lt;br /&gt;
    }&lt;br /&gt;
  &lt;br /&gt;
    ; increase %i so we go on with the next player&lt;br /&gt;
    inc %i&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
  ; if there are no players online, echo is aswell&lt;br /&gt;
  if (%count == 0) echo -a No players found!&lt;br /&gt;
 &lt;br /&gt;
  ; turn off the timer&lt;br /&gt;
  .timer $+ $sockname off&lt;br /&gt;
  ; and close the socket manually&lt;br /&gt;
  sockclose $sockname&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials|Category:Socket]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$&amp;diff=4490</id>
		<title>$</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$&amp;diff=4490"/>
		<updated>2006-04-24T18:13:58Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DollarPlus]] This page serves as a redirection for $+ as the wiki with its current version has difficulties allowing the character + in page names. Awaiting wiki upgrade.&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1375</id>
		<title>$</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1375"/>
		<updated>2006-04-24T18:13:19Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added why its a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DollarPlus]] This page serves as a redirection for [[DollarPlus]] as the wiki with its current version has difficulties allowing the character + in page names. Awaiting wiki upgrade.&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1374</id>
		<title>$</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1374"/>
		<updated>2006-04-24T18:12:00Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: temp redirect until B upgrades wiki&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[DollarPlus]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1373</id>
		<title>$</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$&amp;diff=1373"/>
		<updated>2006-04-12T15:26:15Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: temporary.. need a template for this kind of thing imo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you came to this page looking for information on either [[DollarPlus|$+]] or [[DollarPlus|$+(...)]] it has been placed on the [[DollarPlus]] page due to technical limitations.&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Ison&amp;diff=4488</id>
		<title>Ison</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Ison&amp;diff=4488"/>
		<updated>2006-04-12T08:38:58Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added stacking&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Checks if a certain nick, or list of nicks, are online / in use.&lt;br /&gt;
&lt;br /&gt;
 /ison &amp;lt;nick&amp;gt; [nick2] [nickN]&lt;br /&gt;
&lt;br /&gt;
The result is returned through [[Raw 303]] where [[$1-|$1]] will be your nick and [[$1-|$2-]] will be a list of the nicks you specified that are online, or nothing. See working example below.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The following example will modify the returned output of an /ison request to a more user-friendly format.&lt;br /&gt;
&lt;br /&gt;
 raw 303:*:{&lt;br /&gt;
   if ($2) { echo -a User(s) $2- are online. }&lt;br /&gt;
   else { echo -a The user(s) specified are not online. }&lt;br /&gt;
   haltdef&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic IRC commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Ison&amp;diff=1345</id>
		<title>Ison</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Ison&amp;diff=1345"/>
		<updated>2006-04-12T08:34:55Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Checks if a certain nick is online / in use.&lt;br /&gt;
&lt;br /&gt;
 /ison &amp;lt;nick&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The result is returned through [[Raw 303]] where [[$1-|$1]] will be your nick and [[$1-|$2]] will be the target nick if it exist, or nothing. See working example below.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The following example will modify the returned output of an /ison request to a more user-friendly format.&lt;br /&gt;
&lt;br /&gt;
 raw 303:*:{&lt;br /&gt;
   if ($2) { echo -a $2 is online. }&lt;br /&gt;
   else { echo -a The user is not online. }&lt;br /&gt;
   haltdef&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic IRC commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1344</id>
		<title>Category:Hash Table</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1344"/>
		<updated>2006-04-12T08:24:43Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: /* Basic Defintion */ Added some links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Defintion ==&lt;br /&gt;
Basically, hash tables are like [[:Category:Ini|ini files]], storing information in following format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Tablename&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
item1=data1&amp;lt;br /&amp;gt;&lt;br /&gt;
item2=data2&amp;lt;br /&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
&lt;br /&gt;
However, hash tables are a lot faster than ini- or text-files, which especially takes effect if you have a lot of entries. A kind of disadvantage is the missing possibility to &#039;&#039;see&#039;&#039; all entries. With some files, you can just open them and take a look on every entry, whereat hash table, you can&#039;t just &#039;&#039;open&#039;&#039; then. To have the chance to still get an overview, you can use the following script:&lt;br /&gt;
&lt;br /&gt;
 ; lets make a little alias called &#039;&#039;showhash&#039;&#039;. At the end, it will look like &#039;&#039;/showhash &amp;lt;name&amp;gt;&#039;&#039;&lt;br /&gt;
 [[alias]] showhash {&lt;br /&gt;
  ; echo the name and a kind of &amp;quot;table header&amp;quot;&lt;br /&gt;
  [[echo]] -a [[$1-|$1]]&lt;br /&gt;
  echo -a item =&amp;gt; data&lt;br /&gt;
  [[var]] %i = 1&lt;br /&gt;
  ; lets loop through all items. $hget($1,0).item will return the total amount of items.&lt;br /&gt;
  [[while]] (%i [[If-Then-Else#&amp;lt;=|&amp;lt;=]] [[$hget]]($1,0).item) {&lt;br /&gt;
   echo -a $hget($1,%i).item =&amp;gt; $hget($1,%i).data&lt;br /&gt;
   ; increase looping-variable&lt;br /&gt;
   [[inc]] %i&lt;br /&gt;
  } &lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
=== Modifying hash tables ===&lt;br /&gt;
You can make a new hashtable using the [[Hmake|/hmake]], respectivly delete one using the [[Hfree|/hfree]] command. Using [[Hdel|/hdel]] and [[Hadd|/hadd]], you can modify the data saved in your hashtable. Due to hash tables not being automatically saved, you have to use the [[Hsave|/hsave]] and [[Hload|/hload]] command.&lt;br /&gt;
&lt;br /&gt;
=== Receiving data ===&lt;br /&gt;
After saving data in hash tables, you can of course receive them. Therefor, use the [[$hget]] and [[$hfind]] identifiers.&lt;br /&gt;
&lt;br /&gt;
== More detailed information ==&lt;br /&gt;
&lt;br /&gt;
The following explanations aren&#039;t necessary for using hashtables in mIRC scripts, however, these facts could help you make your scripts faster, especially if you are going to use hash tables for a lot of data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A hashtable is basically an array of N buckets (N being the size from /hmake) where each bucket is just a pointer (4 bytes) to a linked list of items. In principle you could enlarge the number of buckets later on by resizing the array, but that means the hash values for items change: the bucket number for an item, i.e. the index into the array of pointers, is determined by the formula &amp;quot;hashfunc(itemname) modulo N&amp;quot;. Changing N on the fly essentially means you have to reassign most of the items to other buckets, which is a nightmare with large hashtables.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means that $hget will indeed be slower if you take a smaller hashtable and fill it with the same amount of items as before, since the average amount of items to traverse in a bucket when looking for a match is N/2, which would mean that $hget takes much longer on a big file loaded in a small hash table, compared to a big file loaded in a big hash table.&lt;br /&gt;
A benchmark would show this, although you&#039;d have to repeat $hget a large number of times of course, as the speed of individual $hgets is still negligible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the other hand, if your file contains M entries, /hload does M implicit $hgets to ensure that item names won&#039;t be added twice. If the factor M:N (i.e. items:size) is 10:1, then it will do (on average) 5 * M lookups, if it is 100:1, then it will do 50 * M lookups and so on. For large values of M, this difference is noticeable, even with one single /hload. So you should choose N very carefully before issuing a /hload. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that there is no such thing as an &amp;quot;overflow&amp;quot; in hashtables; buckets point to linked lists that can be of arbitrary length. If you make a hashtable of size 1, you are essentially using a single linked list of items, and everything will still work fine (but $hget would be just as slow as $hfind in that case). &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Deleting unwanted items from a hash table ==&lt;br /&gt;
&lt;br /&gt;
In some cases, you&#039;ll want to loop over &#039;&#039;all&#039;&#039; the items in the hashtable, deleting the ones you do not want anymore. It may be a bit unclear at first how to do this: deleting items while looping over them is kind of like removing the ground under your own feet; how can you be sure you don&#039;t end up skipping over items, for example?&lt;br /&gt;
&lt;br /&gt;
Fortunately, there&#039;s one fundamental fact that you can use to do this: if you loop over N items using $hget().item, and then delete the N+1&#039;th item, then those N items will remain the same. The N+1&#039;th item, though, will be a new item (typically the N+2&#039;th item). For example, if $hget().item returns A, B, C and D for respectively N values 1, 2, 3 and 4. and then you delete item C, then you can be sure that $hget().item with N values 1 and 2 will still return A and B after deleting C, respectively. Item D, however, will now be item 3 instead of 4, because there will never be any &amp;quot;gaps&amp;quot; between item numbers.&lt;br /&gt;
&lt;br /&gt;
The following alias shows how to put this into practice, by looping over all the items in a given hashtable, and calling a custom identifier $want-to-delete on each of them, deleting the items for which $want-to-delete returns $true. The loop will always complete (no infinite loop!), and after it has completed, &#039;&#039;all&#039;&#039; the items that were to be deleted, will indeed be gone.&lt;br /&gt;
&lt;br /&gt;
 ; usage: /purgeitems &amp;lt;hashtable&amp;gt;&lt;br /&gt;
 [[alias]] purgeitems {&lt;br /&gt;
   ; our counter: we start off at the first item&lt;br /&gt;
   [[var]] %i = 1&lt;br /&gt;
   &lt;br /&gt;
   ; as long as the %i-th item exists, continue looping&lt;br /&gt;
   [[while]] ($hget($1,%i).item != $null) {&lt;br /&gt;
     ; temporarily store the name of this item in a variable&lt;br /&gt;
     ; $v1 refers to the &amp;quot;$hget($1,%i).item&amp;quot; bit above&lt;br /&gt;
     [[var]] %t = $v1&lt;br /&gt;
     &lt;br /&gt;
     ; now perform a check to see if we still want to keep this item;&lt;br /&gt;
     ; $want-to-delete is a custom alias (not included) and returns&lt;br /&gt;
     ; either $true or $false, indicating whether we should delete %t&lt;br /&gt;
     [[if]] ($want-to-delete(%t)) {&lt;br /&gt;
       ; yes, we want to delete this item; use its item name (%t) to&lt;br /&gt;
       ; actually delete it using /hdel&lt;br /&gt;
       [[hdel]] $1 %t&lt;br /&gt;
       &lt;br /&gt;
       ; the important part is that we do NOT increase %i here;&lt;br /&gt;
       ; we just deleted the %i-th item, so the %i-th item is now a&lt;br /&gt;
       ; new item. due to the way hashtable iteration works, we also&lt;br /&gt;
       ; know for sure that we have not seen the %i-th item yet!&lt;br /&gt;
     }&lt;br /&gt;
     [[else]] {&lt;br /&gt;
       ; we&#039;re leaving this item in, so let&#039;s increase %i so that we&lt;br /&gt;
       ; move on to the next item.&lt;br /&gt;
       [[inc]] %i&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Note that this is a very expensive (slow) operation, you should not use $hget().item unless you have to. If you can, use [[hdel|/hdel]] with the -w (wildcard) switch instead!&lt;br /&gt;
[[Category:MIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1351</id>
		<title>Access Levels</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1351"/>
		<updated>2006-02-18T00:48:07Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added parent category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Access levels are assigned both to a user and to an event and serve to limit a user&#039;s access to only certain events.&lt;br /&gt;
&lt;br /&gt;
The default access level is 1 for users that are not listed in the Users list. All users can access level 1 events. The higher a user&#039;s access level is, the more events that user can access. You can change the default user level to allow unlisted users to access more commands.&lt;br /&gt;
&lt;br /&gt;
== Users ==&lt;br /&gt;
In the Users section you can specify a list of users and their access levels using the format:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;level1,level2,...,levelN&amp;gt;:&amp;lt;useraddress&amp;gt;&lt;br /&gt;
 3,5,6:Dana!dana@staff.quakenet.org&lt;br /&gt;
&lt;br /&gt;
The first level is a general access level, which means that the user can access all levels equal to or less than 3. All the other levels are levels that an event must specifically have to allow a user to access it.&lt;br /&gt;
&lt;br /&gt;
If you want to force the first access level to be a specific level instead of a general access level, you can prefix it with an equal sign.&lt;br /&gt;
 =3,5,6:Dana!dana@staff.quakenet.org&lt;br /&gt;
Now this user has access specifically to level 3, 5, and 6 event and to no other events.&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
In general, the format of an event is:&lt;br /&gt;
 on &amp;lt;prefix&amp;gt;&amp;lt;level&amp;gt;:&amp;lt;event&amp;gt;:&amp;lt;option/parameters&amp;gt;:&amp;lt;target&amp;gt;:&amp;lt;commands/suffix&amp;gt;:&lt;br /&gt;
 &lt;br /&gt;
 on ^3:[[On_text|TEXT]]:hello:?: { [[msg]] [[$nick]] Hi, $nick }&lt;br /&gt;
 on 5:TEXT:hello:?:=&lt;br /&gt;
With the exception of:&lt;br /&gt;
 &amp;lt;prefix&amp;gt; &amp;lt;level&amp;gt;:&amp;lt;event&amp;gt;:&amp;lt;target&amp;gt;:&amp;lt;commands&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 [[Ctcp_(event)|CTCP]] 1:HELP:*: { msg $nick No help is available for level 1 users }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;For information about the on TEXT above, please read about the [[#The_.3D_suffix|= suffix]].&amp;lt;br&amp;gt;&#039;&#039;&lt;br /&gt;
The above ctcp command can be accessed by all users because it is a level 1 command. So if a user with nickname goat sends you a /[[ctcp]] yournick HELP, your script will send them the above reply.&lt;br /&gt;
&lt;br /&gt;
Only the highest level matching event is triggered for a user.&lt;br /&gt;
&lt;br /&gt;
== Named Levels ==&lt;br /&gt;
You can also used named levels which work the same way as a specific level but are easier to understand and read than a number.&lt;br /&gt;
&lt;br /&gt;
 friend:Dana!dana@staff.quakenet.org&lt;br /&gt;
 &lt;br /&gt;
 on @friend:[[On_join|JOIN]]:#: { msg $nick Welcome $nick ! }&lt;br /&gt;
&lt;br /&gt;
This treats the word friend as a specific access level and matches the user with the event, and because the user is your friend, you welcome them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
You can use &#039;&#039;&#039;*&#039;&#039;&#039; as a named level that will match &#039;&#039;ALL&#039;&#039; users.&lt;br /&gt;
&lt;br /&gt;
== Prefixes ==&lt;br /&gt;
You can limit access to an event by specifying special prefixes which determines how an event is processed or triggered by users.&lt;br /&gt;
&lt;br /&gt;
=== The + prefix ===&lt;br /&gt;
You can limit an event to users with a specific access level by using the + prefix.&lt;br /&gt;
&lt;br /&gt;
 10:Dana!dana@staff.quakenet.org&lt;br /&gt;
 &lt;br /&gt;
 ctcp +5:HELP:*: { msg $nick You have accessed a level +5 event }&lt;br /&gt;
&lt;br /&gt;
The above user can&#039;t access this ctcp event even though he has an access level higher than 5, because the event is limited only to level 5 users.&lt;br /&gt;
&lt;br /&gt;
=== The ! prefix ===&lt;br /&gt;
You can prevent an event from being triggered if it was initiated by you by using the ! prefix.&lt;br /&gt;
&lt;br /&gt;
 on !*:JOIN:#: { echo $chan -t $nick join joined $chan }&lt;br /&gt;
You would be unable to access the above event regardless of your access level.&lt;br /&gt;
&lt;br /&gt;
=== The me: prefix ===&lt;br /&gt;
This prefix is the negate of the ! prefix.&lt;br /&gt;
Using me: will only trigger the event if you are the user who triggered the event.&lt;br /&gt;
It would be the same as using the following code in your event:&lt;br /&gt;
 if ($nick == $me) { ... }&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;Note:&#039;&#039;&#039;&#039;&#039; The fact this is a three character prefix makes no difference than any other prefix.&lt;br /&gt;
&lt;br /&gt;
=== The @ prefix ===&lt;br /&gt;
You can limit events to being executed only when you have Ops on a channel by using the @ prefix.&lt;br /&gt;
&lt;br /&gt;
 Blacklist:Dana!dana@staff.quakenet.org&lt;br /&gt;
 &lt;br /&gt;
 on @Blacklist:JOIN:#: { [[mode]] $chan +b [[$address]]($nick,3) | [[kick]] $chan $nick You are blacklisted. }&lt;br /&gt;
&lt;br /&gt;
When the above user joins a channel you have Ops on, the associated /mode and /kick command will be executed, in this case banning and kicking the user. If you don&#039;t have Ops, the event will not trigger.&lt;br /&gt;
&lt;br /&gt;
=== The &amp;amp; prefix ===&lt;br /&gt;
You can prevent an event from being triggered if a previous script used /halt or /haltdef to halt the display of default text for an event by using the &amp;amp; prefix.&lt;br /&gt;
&lt;br /&gt;
 on &amp;amp;1:TEXT:*:?: { echo this event won&#039;t trigger if [[$halted]] is true }&lt;br /&gt;
&lt;br /&gt;
=== The $ prefix ===&lt;br /&gt;
Indicates that the matchtext section of a definition contains a [[Regular_Expression]].&lt;br /&gt;
&lt;br /&gt;
 on $*:TEXT:m/regular expression/switches:#: { echo message: [[$1-]] }&lt;br /&gt;
&lt;br /&gt;
The &#039;m&#039; and switches are optional. The // are required. If switches are used they must be standard PCRE switches, otherwise the match will fail. You can use switch &#039;S&#039; to strip control codes from $1-.&lt;br /&gt;
&lt;br /&gt;
== Suffixes ==&lt;br /&gt;
Suffixes are used to prevent certain users from access the commands.&lt;br /&gt;
&lt;br /&gt;
=== The = suffix ===&lt;br /&gt;
You can prevent users with higher access levels from accessing all lower access level events by using the = suffix.&lt;br /&gt;
&lt;br /&gt;
 10:Dana!dana@staff.quakenet.org&lt;br /&gt;
 &lt;br /&gt;
 ctcp 2:HELP:*: { msg $nick You have accessed a level 2 event }&lt;br /&gt;
 ctcp 5:HELP:*:=&lt;br /&gt;
&lt;br /&gt;
The above user can&#039;t access any of these events because the level 5 event prevents him from accessing all HELP events with access levels lower than 5.&lt;br /&gt;
The only users who can access the above event is someone with user access level 2, 3 or 4.&lt;br /&gt;
&lt;br /&gt;
=== The ! suffix ===&lt;br /&gt;
You can prevent commands for a certain event level from being processed by using the ! suffix.&lt;br /&gt;
&lt;br /&gt;
 ctcp 5:PING:*: { echo PING! }&lt;br /&gt;
 ctcp 5:*:*:!&lt;br /&gt;
&lt;br /&gt;
The ! at the end of the line tells the remote to halt any further processing of level 5 commands.&lt;br /&gt;
&lt;br /&gt;
== Order of definitions ==&lt;br /&gt;
Many of the prefixes and controls are sensitive to numerical order of the definitions. The safest thing is to order your definitions starting with the lowest access levels first and increasing numerically down the list, this makes it easier to keep track of which events should trigger first.&lt;br /&gt;
&lt;br /&gt;
== Also See ==&lt;br /&gt;
*[[auser]]  ;Used to add a users Access Level.&lt;br /&gt;
*[[guser]]  ;This acts the same as auser except it looks up a users ident/host via the server.&lt;br /&gt;
*[[flush]]  ;This clears the remote user list of nickname definitions that are no longer valid.&lt;br /&gt;
*[[ruser]]  ;Used to remove a user or a users access levels.&lt;br /&gt;
*[[rlevel]] ;This removes all users from the remote users list with the specified general access level.&lt;br /&gt;
*[[ulist]]  ;This lists users which have the specified access levels.&lt;br /&gt;
&lt;br /&gt;
[[Category:MIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$mid&amp;diff=4468</id>
		<title>$mid</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$mid&amp;diff=4468"/>
		<updated>2006-02-18T00:45:20Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added parent category, few typos&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns &#039;&#039;&#039;I&#039;&#039;&#039; amount of characters from the &#039;&#039;&#039;N&#039;&#039;&#039;th character in &#039;&#039;&#039;text&#039;&#039;&#039;.&lt;br /&gt;
 $mid(&amp;lt;text&amp;gt;,N[,I])&lt;br /&gt;
I is optional, if I is omitted, it will return from position N onwards.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 var %i = abcde&lt;br /&gt;
 echo -ag $mid(%i,2,3)&lt;br /&gt;
This above example will echo out bcd. This is because it grabs the text from position &#039;&#039;N&#039;&#039; which is &#039;&#039;2&#039;&#039; in this case, &#039;&#039;a&#039;&#039; being &#039;&#039;1&#039;&#039;, and &#039;&#039;b&#039;&#039; being &#039;&#039;2&#039;&#039;. From this spot, we now grab then next &#039;&#039;I&#039;&#039; characters (&#039;&#039;3&#039;&#039;) so we grab &#039;&#039;b=1 c=2 d=3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an example to loop threw every character and check it against something.&lt;br /&gt;
 &#039;&#039;;Set the variable %text to the string we are going to use.&#039;&#039;&lt;br /&gt;
 [[var]] %text = There are 14 brown cows, they&#039;re hyperactive and jump over the 6 lazy red fish. :-(&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;;Set the variable %n to 1 and %i to the length of %text.&#039;&#039;&lt;br /&gt;
 var %n = 1, %i = [[$len]](%text)&lt;br /&gt;
 &#039;&#039;;Creates these local variables so they don&#039;t save as global when used.&#039;&#039;&lt;br /&gt;
 var %letters = 0, %numbers = 0, %spaces = 0, %other = 0&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;;Keep looping while %n is less than or equal to %i.&#039;&#039;&lt;br /&gt;
 [[While loops|while]] (%n [[If-Then-Else#The_Operators|&amp;lt;=]] %i) {&lt;br /&gt;
   &#039;&#039;;Set %letter to the character located at %n, only grab 1 character.&#039;&#039;&lt;br /&gt;
   var %letter = $mid(%text,%n,1)&lt;br /&gt;
 &lt;br /&gt;
   &#039;&#039;;If %letter is a letter, number, space or other set the corresponding variable.&#039;&#039;&lt;br /&gt;
   [[If-Then-Else|if]] (%letter [[If-Then-Else#The_Operators|isletter]]) { [[inc]] %letters }&lt;br /&gt;
   [[If-Then-Else|elseif]] (%letter [[If-Then-Else#The_Operators|isnum]]) { inc %numbers }&lt;br /&gt;
   elseif (%letter [[If-Then-Else#The_Operators|==]] [[$chr]](32)) { inc %spaces }&lt;br /&gt;
   [[If-Then-Else|else]] { inc %other }&lt;br /&gt;
 &lt;br /&gt;
   &#039;&#039;;Increment %n by 1, so first loop %n = 1, then %n = 2 until %n is greater than %i&#039;&#039;&lt;br /&gt;
   inc %n&lt;br /&gt;
 }&lt;br /&gt;
 [[echo]] -ag String: %text&lt;br /&gt;
 echo -ag There are %letters letters, %numbers numbers, %spaces spaces and %other other characters (punctuations etc.)&lt;br /&gt;
&lt;br /&gt;
== Also See ==&lt;br /&gt;
* [[$right]]&lt;br /&gt;
* [[$left]]&lt;br /&gt;
[[Category:Text_and_Number_Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=User:Zyberdog&amp;diff=1276</id>
		<title>User:Zyberdog</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=User:Zyberdog&amp;diff=1276"/>
		<updated>2006-01-27T14:12:59Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: removed category qnet staff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Babel-3|da|en-3|de-1}}&lt;br /&gt;
  &amp;lt;table border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Name&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;David Lorentsen&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Age&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;20&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Country&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Denmark&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr valign=&amp;quot;top&amp;quot; height=&amp;quot;40&amp;quot;&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Access level&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;quakenet staff&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;b&amp;gt;Words of wisdom&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Wisdom is highly overrated.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Members]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=On_action&amp;diff=2170</id>
		<title>On action</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=On_action&amp;diff=2170"/>
		<updated>2006-01-07T14:21:47Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: proper example indentation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The on ACTION event triggers when you receive private and/or channel action.&lt;br /&gt;
 on &amp;lt;level&amp;gt;:ACTION:&amp;lt;matchtext&amp;gt;:&amp;lt;*&amp;gt;&amp;lt;?&amp;gt;&amp;lt;#[,#]&amp;gt;:&amp;lt;commands&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The matchtext can be a [[If-Then-Else#The_Operators|wildcard]] match or even a [[Regular_Expression|regular expression]]. &lt;br /&gt;
To use regular expressions as matchtext, you need the [[Access_Levels|$-Prefix]].&lt;br /&gt;
&lt;br /&gt;
Read [[Access_Levels|access levels]] to get more info about the &amp;lt;level&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
The location where this event occurrs can be either a channel (#), a query (?) or both (*).&lt;br /&gt;
&lt;br /&gt;
You can also use variables as matchtext and location parameter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you  can&#039;t test these events by typing it yourself. To test them, use another connection, that you can establish via [[Server|/server]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 on *:ACTION:*:#: {&lt;br /&gt;
   [[If-Then-Else|if]] (*slaps [[$me]] * [[If-Then-Else#iswm|iswm]] [[$1-]]) {&lt;br /&gt;
     [[msg]] [[$chan]] Don&#039;t slap me, [[$nick]] [[DollarPlus|$+]] !&lt;br /&gt;
   } &lt;br /&gt;
 }&lt;br /&gt;
This example will react on every slap, that hits you and sends a message to this channel: &#039;&#039;Dont slap me, &amp;lt;nickname who has slapped you&amp;gt;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 on *:ACTION:*moos*:#help.script: {&lt;br /&gt;
   msg #help.script $nick just moo&#039;d!. &lt;br /&gt;
 }&lt;br /&gt;
This example will react on every &amp;quot;moos&amp;quot; in #help.script and sends a message to this channel.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
To react on &amp;quot;normal&amp;quot; text, look at the [[On_text|On Text event]].&lt;br /&gt;
Use [[describe]] to send an action to a channel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Events]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=On_action&amp;diff=1263</id>
		<title>On action</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=On_action&amp;diff=1263"/>
		<updated>2006-01-07T14:18:39Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added a few wikilinks&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The on ACTION event triggers when you receive private and/or channel action.&lt;br /&gt;
 on &amp;lt;level&amp;gt;:ACTION:&amp;lt;matchtext&amp;gt;:&amp;lt;*&amp;gt;&amp;lt;?&amp;gt;&amp;lt;#[,#]&amp;gt;:&amp;lt;commands&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The matchtext can be a [[If-Then-Else#The_Operators|wildcard]] match or even a [[Regular_Expression|regular expression]]. &lt;br /&gt;
To use regular expressions as matchtext, you need the [[Access_Levels|$-Prefix]].&lt;br /&gt;
&lt;br /&gt;
Read [[Access_Levels|access levels]] to get more info about the &amp;lt;level&amp;gt; field.&lt;br /&gt;
&lt;br /&gt;
The location where this event occurrs can be either a channel (#), a query (?) or both (*).&lt;br /&gt;
&lt;br /&gt;
You can also use variables as matchtext and location parameter.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you  can&#039;t test these events by typing it yourself. To test them, use another connection, that you can establish via [[Server|/server]].&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 on *:ACTION:*:#: {&lt;br /&gt;
  [[If-Then-Else|if]] (*slaps [[$me]] * [[If-Then-Else#iswm|iswm]] [[$1-]]) {&lt;br /&gt;
   [[msg]] [[$chan]] Don&#039;t slap me, [[$nick]] [[DollarPlus|$+]] !&lt;br /&gt;
  } &lt;br /&gt;
 }&lt;br /&gt;
This example will react on every slap, that hits you and sends a message to this channel: &#039;&#039;Dont slap me, &amp;lt;nickname who has slapped you&amp;gt;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 on *:ACTION:*moos*:#help.script: {&lt;br /&gt;
  msg #help.script $nick just moo&#039;d!. &lt;br /&gt;
 }&lt;br /&gt;
This example will react on every &amp;quot;moos&amp;quot; in #help.script and sends a message to this channel.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
To react on &amp;quot;normal&amp;quot; text, look at the [[On_text|On Text event]].&lt;br /&gt;
Use [[describe]] to send an action to a channel.&lt;br /&gt;
&lt;br /&gt;
[[Category:Events]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1264</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1264"/>
		<updated>2006-01-05T14:56:17Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: proper link for bemember&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== This Wiki ==&lt;br /&gt;
&lt;br /&gt;
Welcome to the Scriptwiki, a wiki dedicated to mIRC scripting! Here, you can find information and reference material to help you write scripts for mIRC; we have information ranging from simple tutorials to extensive mIRC help, and also a number of prefabricated scripts.&lt;br /&gt;
&lt;br /&gt;
In contrast to many other wikis, here normal users aren&#039;t allowed to make changes to the wiki. This way, we can ensure a certain level of quality. You are totally free to read the material, but if you want to contribute to this wiki, you need to be approved as a wiki editor. You can become a wiki editor in the following two ways:&lt;br /&gt;
* Be invited by an [[Members|existing wiki editor]] (or an admin) and approved by the admins.&lt;br /&gt;
* Fill in an application, found [[Special:BeMember|here]]. It will be processed by the admins and you will be notified if the result is positive. To present your article writing skills, you can write a sample article and attach it to the application.&lt;br /&gt;
&lt;br /&gt;
== Script Archive ==&lt;br /&gt;
&lt;br /&gt;
You can find several prefabricated scripts in our [[:Category:Script Archive|Script Archive]], which serve as examples and can be used to build more complex scripts.&lt;br /&gt;
&lt;br /&gt;
== mIRC help ==&lt;br /&gt;
&lt;br /&gt;
If you&#039;re not sure how a command or an identifier works, you can check it from our [[:Category:MIRC_Help|mIRC Help]] pages.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
&lt;br /&gt;
Our [[:Category:Tutorials|tutorials]] aim to provide a step-by-step introduction to various mIRC scripting related topics.&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:File_Handling&amp;diff=1250</id>
		<title>Category:File Handling</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:File_Handling&amp;diff=1250"/>
		<updated>2005-12-22T18:17:52Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: better overview&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Explanation ==&lt;br /&gt;
Using the commands and identifiers in this category allows you to modify a file directly. That means that mIRC opens a connection to the specified and locks this connection when you are opening a file using [[Fopen|/fopen]]. At the same moment, a (file-)pointer is set to the start of the file. You can now read the character the pointer points to (either by using [[$fread]] that reads the entire line until the next [[$crlf]] or by using [[$fgetc]] that reads the &amp;quot;next&amp;quot; character only - note that the pointer is automatically moved to the begin of the next line / next character by using these identifiers) or move the pointer to another position in the file (by using [[Fseek|/fseek]]). After you&#039;ve modified you file, you &#039;&#039;&#039;have to&#039;&#039;&#039; close it again (to unlock it and so make it accessible by other applications) using [[Fclose|/fclose]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you should check [[$ferr]] after every modification of the file (inclusive opening it).&lt;br /&gt;
&lt;br /&gt;
== Difference to /write and $read ==&lt;br /&gt;
Contrary to this, the &amp;quot;usual&amp;quot; way to access a file ([[Write|/write]] and [[$read]] that is) work in another way. For example, if you want to echo line number 4 and 5 of a file, you would use:        &lt;br /&gt;
 [[echo]] -a $read(my.txt,4) $read(my.txt,5)&lt;br /&gt;
Internally, mIRC would do following:&lt;br /&gt;
#open the file (using fopen)&lt;br /&gt;
#read the first line (using $fread - check [[$read]] for more details about it)&lt;br /&gt;
#move the pointer to the start of line 4 (using fseek) &lt;br /&gt;
#read this line (using $fread)&lt;br /&gt;
#close the file (using fclose)&lt;br /&gt;
#open the file again (using fopen)&lt;br /&gt;
#move the pointer to the start of line 5 (using fseek) &lt;br /&gt;
#read this line (using $fread)&lt;br /&gt;
#close the file (using fclose) again&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That&#039;s obviously not efficient, as we don&#039;t need to close it after our first read. So using File Handling, we could directly do:&lt;br /&gt;
#open the file (using fopen)&lt;br /&gt;
#jump to line 4 (using fseek)&lt;br /&gt;
#read this line (using fread)&lt;br /&gt;
#read the next line (and the pointer is automatically there after reading line 4 - using fread)&lt;br /&gt;
#close the file (using flose)&lt;br /&gt;
If you want to read one or two lines only, there is no need to use this way, as $read is alot easier to handle, but if you have a file of e.g. 40mb and want to read 100 lines, there is a &#039;&#039;big&#039;&#039; difference between File Handling and $read (~ factor 10).&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:mIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:File_Handling&amp;diff=1247</id>
		<title>Category:File Handling</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:File_Handling&amp;diff=1247"/>
		<updated>2005-12-22T18:16:26Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: test preview&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Explanation ==&lt;br /&gt;
Using the commands and identifiers in this category allows you to modify a file directly. That means that mIRC opens a connection to the specified and locks this connection when you are opening a file using [[Fopen|/fopen]]. At the same moment, a (file-)pointer is set to the start of the file. You can now read the character the pointer points to (either by using [[$fread]] that reads the entire line until the next [[$crlf]] or by using [[$fgetc]] that reads the &amp;quot;next&amp;quot; character only - note that the pointer is automatically moved to the begin of the next line / next character by using these identifiers) or move the pointer to another position in the file (by using [[Fseek|/fseek]]). After you&#039;ve modified you file, you &#039;&#039;&#039;have to&#039;&#039;&#039; close it again (to unlock it and so make it accessible by other applications) using [[Fclose|/fclose]].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you should check [[$ferr]] after every modification of the file (inclusive opening it).&lt;br /&gt;
&lt;br /&gt;
== Difference to /write and $read ==&lt;br /&gt;
Contrary to this, the &amp;quot;usual&amp;quot; way to access a file ([[Write|/write]] and [[$read]] that is) work in another way. For example, if you want to echo line number 4 and 5 of a file, you would use:        &lt;br /&gt;
 [[echo]] -a $read(my.txt,4) $read(my.txt,5)&lt;br /&gt;
Internally, mIRC would do following:&lt;br /&gt;
#open the file (using fopen)&lt;br /&gt;
#read the first line (using $fread - check [[$read]] for more details about it)&lt;br /&gt;
#move the pointer to the start of line 4 (using fseek) &lt;br /&gt;
#read this line (using $fread)&lt;br /&gt;
#close the file (using fclose)&lt;br /&gt;
#open the file again (using fopen)&lt;br /&gt;
#move the pointer to the start of line 5 (using fseek) &lt;br /&gt;
#read this line (using $fread)&lt;br /&gt;
#close the file (using fclose) again&lt;br /&gt;
That&#039;s obviously not efficient, as we don&#039;t need to close it after our first read. So using File Handling, we could directly do:&lt;br /&gt;
#open the file (using fopen)&lt;br /&gt;
#jump to line 4 (using fseek)&lt;br /&gt;
#read this line (using fread)&lt;br /&gt;
#read the next line (and the pointer is automatically there after reading line 4 - using fread)&lt;br /&gt;
#close the file (using flose)&lt;br /&gt;
If you want to read one or two lines only, there is no need to use this way, as $read is alot easier to handle, but if you have a file of e.g. 40mb and want to read 100 lines, there is a &#039;&#039;big&#039;&#039; difference between File Handling and $read (~ factor 10).&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:mIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$read&amp;diff=1222</id>
		<title>$read</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$read&amp;diff=1222"/>
		<updated>2005-12-10T20:02:48Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: htmltable -&amp;gt; wikitable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns a line of text from a text file.&lt;br /&gt;
 $read(&#039;&#039;filename&#039;&#039;,[ntswrp],[&#039;&#039;string&#039;&#039;],[&#039;&#039;N&#039;&#039;])&lt;br /&gt;
The first parameter is the filename and the only required parameter.&lt;br /&gt;
If you omit all other parameters you will be returned with a random line from the file.&lt;br /&gt;
&lt;br /&gt;
The second parameter is a set of options that determin the type of search you wish to use, for a full description see the table below.&lt;br /&gt;
if &#039;&#039;string&#039;&#039; is numerical and you do not use &#039;&#039;swr&#039;&#039; switch the line corresponding to the numerical value will be returned.&lt;br /&gt;
&lt;br /&gt;
If the &#039;&#039;N&#039;&#039; parameter is given it starts to search the file from that line number.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; If the first line of your text file is a numerical value mIRC treats this number as the total number of lines in the text file, be careful not to accidently have your file cut short due to an unexpected numerical value.&lt;br /&gt;
If you specify N = 0, mIRC returns the value of the first line if it&#039;s a number.&lt;br /&gt;
Take good note of the &#039;&#039;t&#039;&#039; switch in the table below.&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
| style=&amp;quot;width:5%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || style=&amp;quot;width:95%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| n || If the &#039;&#039;n&#039;&#039; switch is specified then the line read in will not be evaluated and will be treated as plain text.&lt;br /&gt;
|-&lt;br /&gt;
| t || If the &#039;&#039;t&#039;&#039; switch is specified then mIRC will treat the first line in the file as plain text, even if it is a numeric.&lt;br /&gt;
|-&lt;br /&gt;
| s || Scans the &#039;&#039;filename&#039;&#039; for a line beginning with the &#039;&#039;string&#039;&#039; and returns the text following the match value.&lt;br /&gt;
|-&lt;br /&gt;
| w || Scans the &#039;&#039;filename&#039;&#039; for a line matching &#039;&#039;string&#039;&#039;, where &#039;&#039;string&#039;&#039; can contain [[If-Then-Else#iswm|wildcards]].&lt;br /&gt;
|-&lt;br /&gt;
| r || Scans the &#039;&#039;filename&#039;&#039; for a line matching &#039;&#039;string&#039;&#039;, where &#039;&#039;string&#039;&#039; is taken as a [[Regular_Expressions|regular expression]].&lt;br /&gt;
|-&lt;br /&gt;
| p || If the &#039;&#039;p&#039;&#039; switch is specified, command &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt; separators are treated as such instead of as plain text.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 &#039;&#039;&#039;&#039;&#039;Example.txt:&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
 5&lt;br /&gt;
 Ave It&lt;br /&gt;
 Hash Help Dot Script&lt;br /&gt;
 6&lt;br /&gt;
 Cows dont go moo, Fish go moo!&lt;br /&gt;
 Fish go moo&lt;br /&gt;
 Yes they do&lt;br /&gt;
The above is an example text file used in the following examples.&lt;br /&gt;
&lt;br /&gt;
 $read(&#039;&#039;Example.txt&#039;&#039;,&#039;&#039;s&#039;&#039;,&#039;&#039;Ave&#039;&#039;)  ;Returns &#039;&#039;It&#039;&#039;, all data that follows the first line starting with &#039;&#039;Ave&#039;&#039;.&lt;br /&gt;
 $read(&#039;&#039;Example.txt&#039;&#039;,&#039;&#039;w&#039;&#039;,&#039;&#039;*moo&#039;&#039;)  ;Returns &#039;&#039;Fish go moo&#039;&#039;, note the lack of pending asterisks means moo has to be the last word.&lt;br /&gt;
 $read(&#039;&#039;Example.txt&#039;&#039;,&#039;&#039;3&#039;&#039;)  ;Returns &#039;&#039;6&#039;&#039;, This is the 3rd line in the file if you count line 1 as the linecount line because it is a number.&lt;br /&gt;
 $read(&#039;&#039;Example.txt&#039;&#039;,&#039;&#039;t&#039;&#039;,&#039;&#039;3&#039;&#039;)  ;Returns &#039;&#039;Hash Help Dot Script&#039;&#039;, This is the 3rd line in the file if you count line 1 plain text.&lt;br /&gt;
 $read(&#039;&#039;Example.txt&#039;&#039;,&#039;&#039;w&#039;&#039;,&#039;&#039;*moo&#039;&#039;)  ;Returns &#039;&#039;&lt;br /&gt;
 &lt;br /&gt;
 [[kick]] [[$chan]] [[$nick]] $read(Example.txt)  ;Kicks a user with a random line from the text file.&lt;br /&gt;
== Also See ==&lt;br /&gt;
* [[$readn]] This returns the line number that $read just returned.&lt;br /&gt;
* [[play]] This is a much better alternative if you require to list the content of a whole file to a channel.&lt;br /&gt;
* [[filter]] This can help with more complex needs when reading in content from files or windows.&lt;br /&gt;
* [[loadbuf]] This is a much better alternative if you need to dump many lines of text to a dialog or to a custom window&lt;br /&gt;
&lt;br /&gt;
[[Category:File and Directory Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1313</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1313"/>
		<updated>2005-12-07T21:04:21Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 [[#==|==]]        equal to&lt;br /&gt;
 [[#==|===]]       equal to (case-sensitive)&lt;br /&gt;
 [[#!=|!=]]        not equal to&lt;br /&gt;
 [[#&amp;lt;|&amp;lt;]]         less than&lt;br /&gt;
 [[#&amp;gt;|&amp;gt;]]         larger than&lt;br /&gt;
 [[#&amp;lt;=|&amp;lt;=]]        less than or equal to&lt;br /&gt;
 [[#&amp;gt;=|&amp;gt;=]]        larger than or equal to&lt;br /&gt;
 [[#//|//]]        v2 is a multiple of v1&lt;br /&gt;
 [[#\\|\\]]        v2 is not a multiple of v1&lt;br /&gt;
 [[#&amp;amp;|&amp;amp;]]         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#isin|isin]]      string v1 is in string v2&lt;br /&gt;
 [[#isin|isincs]]    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 [[#iswm|iswmcs]]    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 [[#isnum|isnum]]     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 [[#isletter|isletter]]  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 [[#isalnum|isalnum]]   text contains only letters and numbers&lt;br /&gt;
 [[#isalpha|isalpha]]   text contains only letters&lt;br /&gt;
 [[#islower|islower]]   text contains only lower case letters&lt;br /&gt;
 [[#isupper|isupper]]   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 [[#ison|ison]]      if v1 is on channel v2&lt;br /&gt;
 [[#isop|isop]]      if v1 is an op on channel v2&lt;br /&gt;
 [[#ishop|ishop]]     if v1 is a halfop on channel v2&lt;br /&gt;
 [[#isvoice|isvoice]]   if v1 has a voice on channel v2&lt;br /&gt;
 [[#isreg|isreg]]     if v1 is a normal nick on channel v2&lt;br /&gt;
 [[#ischan|ischan]]    if v1 is a channel which you are on.&lt;br /&gt;
 [[#isban|isban]]     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 [[#isaop|isaop]]     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isavoice|isavoice]]  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isignore|isignore]]  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 [[#isprotect|isprotect]] if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isnotify|isnotify]]  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; To negate an operator you can prefix it with an exclamation mark (!).&lt;br /&gt;
&lt;br /&gt;
=== == ===&lt;br /&gt;
 if (cat == cAt)  ;Returns true since == is case-insensitive.&lt;br /&gt;
 if (cat === cAt) ;Returns false since === is case-sensitive.&lt;br /&gt;
The above checks that v1 (cat) matches v2 (cAt).&lt;br /&gt;
&lt;br /&gt;
=== != ===&lt;br /&gt;
 if (cat != cAt)  ;Returns false since != is case-insensitive and both values v1 and v2 are equal.&lt;br /&gt;
 if (cat !== cAt) ;Returns true since !== is case-sensitive and both values v1 and v2 are not equal when case is taken in to consideration.&lt;br /&gt;
The != and !== operators are the negates of the == and === operators.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt; ===&lt;br /&gt;
 if (6 &amp;lt; 9) ;Returns true because the numerical value 6 is less than 9.&lt;br /&gt;
Checks that v1 (6) has a lower numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt; ===&lt;br /&gt;
 if (6 &amp;gt; 9) ;Returns false because the numerical value 6 is not greater than 9.&lt;br /&gt;
Checks that v1 (6) has a higher numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;= ===&lt;br /&gt;
 if (6 &amp;lt;= 9) ;Returns true because the numerical value 6 is less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a lower or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt;= ===&lt;br /&gt;
 if (6 &amp;gt;= 9) ;Returns false because the numerical value 6 is not less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a greater or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== // ===&lt;br /&gt;
 if (3 // 9) ;Returns true because 3 is a multipul of 9.&lt;br /&gt;
Multipuls of 9 are numbers that when devided in to 9 result in an integer.&lt;br /&gt;
You are not limited to positive numbers.&lt;br /&gt;
&lt;br /&gt;
=== \\ ===&lt;br /&gt;
 if (3 \\ 9) ;Returns false because 3 is a multipul of 9.&lt;br /&gt;
\\ is the negate of //&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp; ===&lt;br /&gt;
 if (13 &amp;amp; 4) ;Returns true because the 4th bit of 13 is [[$biton|turned on]].&lt;br /&gt;
&amp;amp; Is a bitwise comparison and checks thats bit v2 (4) is &#039;turned on&#039; in v1.&lt;br /&gt;
Using &amp;amp; operator is the same as using [[$isbit]].&lt;br /&gt;
&lt;br /&gt;
=== isin ===&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
 if (cat isin [[$1-]]) &lt;br /&gt;
Matches for &amp;quot;a &#039;&#039;cat&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;cat&#039;&#039;alog&amp;quot;, &amp;quot;impli&#039;&#039;cat&#039;&#039;e &amp;quot; and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== iswm ===&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0 or more characters&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (atleast 1 or more non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (home*away*lost iswm $1-)&lt;br /&gt;
This would match anything starting with home and ending in lost, with away being between home and lost.&lt;br /&gt;
It would match, &amp;quot;homeawaylost&amp;quot;, &amp;quot;home away lost&amp;quot;, &amp;quot;home is missed when you are away or lost&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
Requires one character after &amp;quot;ca&amp;quot; and allows 0 or more character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
Matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
Examples would be, &amp;quot;I love you&amp;quot;, &amp;quot;I hate you&amp;quot;, &amp;quot;I Moo You&amp;quot;, it would not however match, &amp;quot;I dont love you&amp;quot; since &amp;quot;dont love&amp;quot; contains a space.&lt;br /&gt;
&lt;br /&gt;
=== isnum ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum)  ;Returns true if $1 is of numeric value&lt;br /&gt;
 if ($1 isnum 10-)  ;Returns true if $1 is number higher than 10&lt;br /&gt;
 if ($1 isnum 20-30)  ;Returns true if $1 is a number between 20 and 30&lt;br /&gt;
&lt;br /&gt;
The Examples above checks $1 if, is it a number?, is it a number above 10?, is it a number between 20 and 30?&lt;br /&gt;
&lt;br /&gt;
=== isletter ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isletter)  ;Returns true if &#039;&#039;$1&#039;&#039; is a letter, any letter&lt;br /&gt;
 if ($1 isletter abcdefg)  ;Returns true if &#039;&#039;$1&#039;&#039; is in the string of letters &#039;&#039;abcdefg&#039;&#039;&lt;br /&gt;
 if ($1 isletter HelloWorld)  ;Returns true if &#039;&#039;$1&#039;&#039; is in the string of letters &#039;&#039;HeloWrd&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Note that the checking is case-sensitive, the letter &#039;&#039;h&#039;&#039; will not return true if checked against the string &#039;&#039;HelloWorld&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== isalnum ===&lt;br /&gt;
 if (Dana34 isalnum) ;returns true as &#039;&#039;Dana34&#039;&#039; contains letters and numbers only&lt;br /&gt;
 if (Dana_ isalnum) ;returns false as &#039;&#039;_&#039;&#039; is neither letter nor number&lt;br /&gt;
&lt;br /&gt;
Matches whether the string consists of letters and numbers only.&lt;br /&gt;
&lt;br /&gt;
=== isalpha ===&lt;br /&gt;
 if (Dana isalpha) ; returns true as &#039;&#039;Dana&#039;&#039; consists of letters only&lt;br /&gt;
 if (foo42 isalpha) ; returns false as &#039;&#039;42&#039;&#039; is no letter&lt;br /&gt;
&lt;br /&gt;
Isalpha checks whether the word consists of letters only. It doesn&#039;t matter whether there are upper or lower case.&lt;br /&gt;
&lt;br /&gt;
=== islower ===&lt;br /&gt;
 if (moo islower) ; returns true as all letters in &#039;&#039;moo&#039;&#039; are lower case.&lt;br /&gt;
 if (m0o islower) ; returns true as well as all letters in &#039;&#039;m0o&#039;&#039; are lower case. &lt;br /&gt;
 if (mooO islower) ; retursn false as there is an upper &#039;&#039;O&#039;&#039; in &#039;&#039;mooO&#039;&#039;.&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that islower checks whether all letters in the string are upper case. There can still be numbers or other characters in the string $1.&lt;br /&gt;
&lt;br /&gt;
=== isupper ===&lt;br /&gt;
 if (MOO isupper) ; returns true as &#039;&#039;MOO&#039;&#039; consists of upper case letters only&lt;br /&gt;
 if (1234 isupper) ; returns true as all letters in &#039;&#039;1234&#039;&#039; are upper case, as there are none.&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that it checks whether all letters in $1 are upper case. There can still be numbers or other characters in $1.&lt;br /&gt;
&lt;br /&gt;
=== ison ===&lt;br /&gt;
 if (Dana ison #help.script) ; returns true as &#039;&#039;Dana&#039;&#039; is in the channel #help.script&lt;br /&gt;
 if (foo !ison #help.script) ; returns true as &#039;&#039;foo&#039;&#039; is not in #help.script&lt;br /&gt;
&lt;br /&gt;
This checks whether $1 is in the channel $2.&lt;br /&gt;
&lt;br /&gt;
=== isop ===&lt;br /&gt;
 if (Dana isop #help.script) ; returns true as &#039;&#039;Dana&#039;&#039; is an operator in #help.script&lt;br /&gt;
 if (foo isop #help.script) ; returns false as &#039;&#039;foo&#039;&#039; is no operator in #help.script&lt;br /&gt;
&lt;br /&gt;
Checks whether $1 is an operator in $2.&lt;br /&gt;
&lt;br /&gt;
=== ishop ===&lt;br /&gt;
 if (moo ishop #mIRC) ; returns true if &#039;&#039;moo&#039;&#039; is an half operator in #mIRC&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that QuakeNet does not support halfops.&lt;br /&gt;
&lt;br /&gt;
=== isvoice ===&lt;br /&gt;
 if (Dana isvoice #help.script) ; returns true as &#039;&#039;Dana&#039;&#039; has voice in #help.script.&lt;br /&gt;
 if (foobar isvoice #help.script) ; returns false as &#039;&#039;foobar&#039;&#039; has no voice in #help.script.&lt;br /&gt;
This checks if $1 has voice in $2 or not.&lt;br /&gt;
&lt;br /&gt;
=== isreg ===&lt;br /&gt;
 if (Dana isreg #help.script) ; returns false as Dana is no regular user in #help.script.&lt;br /&gt;
 if (foobar isreg #help.script) ; returns true as foobar is a regular user in #help.script.&lt;br /&gt;
This checks whether $1 is a regular user (no voice, no half operator, no operator) in $2.&lt;br /&gt;
&lt;br /&gt;
=== ischan ===&lt;br /&gt;
 if (#help.script ischan) ; returns true as you are in #help.script.&lt;br /&gt;
 if (#foobar ischan) ; returns false as you are no in #foobar.&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that it returns true only if you are in this channel.&lt;br /&gt;
&lt;br /&gt;
=== isban ===&lt;br /&gt;
 if (idiot!*@* isban) ; returns true as &#039;&#039;idiot!*@*&#039;&#039; is in your [[:Category:IAL]].&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you cannot use this to check whether this address is banned in a specific channel. You&#039;d have to use [[$ibl]] to do it.&lt;br /&gt;
&lt;br /&gt;
=== isaop ===&lt;br /&gt;
 if (foobar isaop) ; returns true if &#039;&#039;foobar&#039;&#039; is in your autoop list for any channel.&lt;br /&gt;
 if (foobar isaop #help.script) ; returns true if &#039;&#039;foobar&#039;&#039; is in your autoop list for #help.script.&lt;br /&gt;
To put someone in your autoop-list, take a look at [[Aop|/aop]].&lt;br /&gt;
&lt;br /&gt;
=== isavoice ===&lt;br /&gt;
 if (foobar isavoice) ; returns true if &#039;&#039;foobar&#039;&#039; is in your autovoicelist for any channel.&lt;br /&gt;
 if (foobar isavoice #help.script) ; returns true if &#039;&#039;foobar&#039;&#039; is your autovoicelist for #help.script.&lt;br /&gt;
To put someone in your autovoicelist, take a look at [[Avoice|/avoice]].&lt;br /&gt;
&lt;br /&gt;
=== isignore ===&lt;br /&gt;
 if (foobar isignore) ; returns true if &#039;&#039;foobar&#039;&#039; is in your ignore list.&lt;br /&gt;
 if (foobar isignore c) ; returns true if &#039;&#039;foobar&#039;&#039; is in your ignore list with switch -c.&lt;br /&gt;
To get a more in detail explanation of these switches, take a look at [[Ignore|/ignore]].&lt;br /&gt;
&lt;br /&gt;
=== isprotect ===&lt;br /&gt;
 if (foobar isprotect) ; returns true if &#039;&#039;foobar&#039;&#039; is in your protect list.&lt;br /&gt;
 if (foobar isprotect #help.script) ; returns true if &#039;&#039;foobar&#039;&#039; is in your protect list for #help.script.&lt;br /&gt;
To get more information about protection, see [[Protect|/protect]].&lt;br /&gt;
&lt;br /&gt;
=== isnotify ===&lt;br /&gt;
 if (Dana isnotify) ; returns true if Dana is in your notify list.&lt;br /&gt;
Take a look at [[Notify|/notify]] to add someone to your notifylist. If someone in your notifylist connects (disconnects), the [[On_notify|On notify event]] ([[On_unotify|On Unotify event]]) is triggered.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
====&#039;&#039;Not all comparations need two parameters&#039;&#039;====&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- only contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====&#039;&#039;This article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators&#039;&#039;====&lt;br /&gt;
You &#039;&#039;&#039;can&#039;t&#039;&#039;&#039; use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
To check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$0&amp;diff=1335</id>
		<title>$0</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$0&amp;diff=1335"/>
		<updated>2005-12-07T14:45:24Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: removed author template, not that much contributed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Remote Identifiers]]&lt;br /&gt;
&lt;br /&gt;
The identifier $0 is used in conjunction with [[$1-|$1]]. Technically it returns the number of tokens in the parameter passed. Unless the [[tokenize]] command has been used this defaults to being spaces, hence $0 will return the number of words in most cases.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
When used in an [[Aliases|alias]] it can look something like this.&lt;br /&gt;
&lt;br /&gt;
 alias count_words { [[Echo|echo -a]] That was $0 words }&lt;br /&gt;
&lt;br /&gt;
Usage: /count_words Here is a sentence I want to count the words in..&lt;br /&gt;
&lt;br /&gt;
When used in an [[Events|event]] it acts the same.&lt;br /&gt;
&lt;br /&gt;
 [[On_text|on *:text]]:!count *:#mirc:{ [[msg]] [[$chan]] That was $0 words }&lt;br /&gt;
&lt;br /&gt;
Usage: !count Here&#039;s another sentence we want to have fun with!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that $0 returns total number of tokens, meaning that in the event example above it will also count the word !count as being part of the sentence. You can bypass this by using [[$calc]]($0 - 1). This is not the case for the alias.&lt;br /&gt;
&lt;br /&gt;
[[Category:Remote Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1210</id>
		<title>Category:Hash Table</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1210"/>
		<updated>2005-12-07T14:43:43Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:MIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$lower&amp;diff=4211</id>
		<title>$lower</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$lower&amp;diff=4211"/>
		<updated>2005-12-05T03:06:16Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: tweak&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns text in lowercase.&lt;br /&gt;
&lt;br /&gt;
 $lower(text)&lt;br /&gt;
&lt;br /&gt;
$lower forces its parameter to lowercase characters.&lt;br /&gt;
&lt;br /&gt;
$lower(&#039;&#039;FOO&#039;&#039;) returns &#039;&#039;foo&#039;&#039;, and $lower(&#039;&#039;bAr&#039;&#039;) returns &#039;&#039;bar&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[$upper]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text and Number Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$upper&amp;diff=2191</id>
		<title>$upper</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$upper&amp;diff=2191"/>
		<updated>2005-12-05T03:05:31Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns given &#039;&#039;text&#039;&#039; in uppercase.&lt;br /&gt;
&lt;br /&gt;
 $upper(&#039;&#039;text&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
$upper forces its parameter to uppercase characters.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 $upper(&#039;&#039;foo&#039;&#039;)  ;returns &#039;&#039;FOO&#039;&#039;&lt;br /&gt;
 [[$lower]](&#039;&#039;bAr&#039;&#039;)  ;returns &#039;&#039;bar&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* The opposite identifier is [[$lower]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text and Number Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$isupper&amp;diff=2184</id>
		<title>$isupper</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$isupper&amp;diff=2184"/>
		<updated>2005-12-05T03:01:04Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns [[$true]] if &#039;&#039;text&#039;&#039; specified is all upper case.&lt;br /&gt;
&lt;br /&gt;
 $isupper(&#039;&#039;text&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 $isupper(HELLO)  ;returns $true as &#039;&#039;HELLO&#039;&#039; is all upper case&lt;br /&gt;
 $isupper(WiCKED)  ;returns [[$false]] as &#039;&#039;WiCKED&#039;&#039; is not all upper case &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* The counterpart of this identifier is [[$islower]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text and Number Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$islower&amp;diff=2183</id>
		<title>$islower</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$islower&amp;diff=2183"/>
		<updated>2005-12-05T02:58:58Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns [[$true]] if &#039;&#039;text&#039;&#039; specified is all lower case.&lt;br /&gt;
&lt;br /&gt;
 $islower(&#039;&#039;text&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 $islower(helloworld)  ;returns $true as &#039;&#039;helloworld&#039;&#039; is all lower case&lt;br /&gt;
 $islower(HelloWorld)  ;returns [[$false]] as &#039;&#039;HelloWorld&#039;&#039; is not all lower case &lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* The counterpart of this identifier is [[$isupper]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text and Number Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$true&amp;diff=1188</id>
		<title>$true</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$true&amp;diff=1188"/>
		<updated>2005-12-05T02:54:46Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: just added some if-then-else operator references&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This identifier is the opposite of $false, which are both the result of an [[if|If-Then-Else]]-statement and returned by some other identifiers and are both explained in this article. These two identifiers are rarely actually written in a mirc script, but they are always &#039;working behind the scenes&#039;.&lt;br /&gt;
&lt;br /&gt;
 $true or $false&lt;br /&gt;
&lt;br /&gt;
To understand the essence of these identifiers, you should first read about if-statements.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
Every if-statement is either $true or $false, depending on whether the statement is true or not. So, for example:&lt;br /&gt;
&lt;br /&gt;
 if (a [[If-Then-Else#.3D.3D|==]] b) { blah }  ;in this case, &#039;blah&#039; doesn&#039;t get executed because the if-statement is $false&lt;br /&gt;
 if (3 [[If-Then-Else#.3C|&amp;lt;]] 7) { bleh }  ;in this case, &#039;bleh&#039; gets executed because the if-statement is $true&lt;br /&gt;
 if ($true) { bluh }  ;in this case, &#039;bluh&#039; gets executed as $true is always true.&lt;br /&gt;
&lt;br /&gt;
Quite many identifiers are used just to check whether something is true or not, for example [[$islower]] and [[$away]]. And to check that, there&#039;s an if-sentence even if it doesn&#039;t always look much like it. So actually, the following three lines are exactly the same, but the first one is just a &#039;shortcut&#039; (and should actually never be used, the middle one is the preferred syntax).&lt;br /&gt;
 if $away do_this &lt;br /&gt;
 if ($away) { do_this }&lt;br /&gt;
 if ($away == $true) { do_this }&lt;br /&gt;
&lt;br /&gt;
[[Category:Other Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$cid&amp;diff=1952</id>
		<title>$cid</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$cid&amp;diff=1952"/>
		<updated>2005-12-05T02:50:16Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the server connection id for the current script.&lt;br /&gt;
&lt;br /&gt;
 $cid&lt;br /&gt;
&lt;br /&gt;
* This identifier has no properties or parameters&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* Some window identifiers have their own connection id counterpart, such as [[$activecid]] and [[$lactivecid]].&lt;br /&gt;
* Most [[:Category:Window Identifiers|window related identifers]] also have a .cid property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Identifiers]] [[Category:Multi-server]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Binary_Files&amp;diff=1572</id>
		<title>Category:Binary Files</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Category:Binary_Files&amp;diff=1572"/>
		<updated>2005-12-02T22:49:59Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added parent category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
[[Category:MIRC Help]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$isbit&amp;diff=2525</id>
		<title>$isbit</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$isbit&amp;diff=2525"/>
		<updated>2005-12-02T22:44:38Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns 1 if the Nth bit in number A is turned on, otherwise 0 will be returned.&lt;br /&gt;
 $isbit(A,N)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the table below is information about bits, values and their binary representation&lt;br /&gt;
{|class=&amp;quot;gallery&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:100px&amp;quot; | &#039;&#039;&#039;&#039;&#039;Binary&#039;&#039;&#039;&#039;&#039; || &#039;&#039;&#039;&#039;&#039;Value&#039;&#039;&#039;&#039;&#039; || &#039;&#039;&#039;&#039;&#039;Bit&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| 00001      || 1 || 1&lt;br /&gt;
|-&lt;br /&gt;
| 00010      || 2 || 2&lt;br /&gt;
|-&lt;br /&gt;
| 00100      || 4 || 3&lt;br /&gt;
|-&lt;br /&gt;
| 01000      || 8 || 4&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border:1px dotted #2f6fab; color: Black;&amp;quot; | 01101      || style=&amp;quot;border:1px dotted #2f6fab; color: Black;&amp;quot; | 13 || style=&amp;quot;border:1px dotted #2f6fab; color: Black;&amp;quot; | 1,3 and 4&lt;br /&gt;
|-&lt;br /&gt;
| 10000      || 16 || 5&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
As you can see by the table above in the highlighted cells, if you have the value 13 it requires the 1st, 3rd and 4th bit to be turned on.&lt;br /&gt;
How we figure this out, is we take the 1st, 3rd and 4th bit and add them together 1+4+8 and this gives a value of 13.&lt;br /&gt;
Using the bits values 1,2,4,8 and 16 in this example it is impossible to get to 13 other than using 1,4 and 8.&lt;br /&gt;
This can be seen in the [[#Examples|example below]].&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 [[var]] %i = 1 &lt;br /&gt;
 [[while]] (%i [[If-Then-Else#The_Operators|&amp;lt;=]] 13) {&lt;br /&gt;
   [[echo]] -ag %i bit is [[$iif]]($isbit(13,%i),On,Off) &lt;br /&gt;
   [[inc]] %i&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
*[[$and]]&lt;br /&gt;
*[[$biton]]&lt;br /&gt;
*[[$bitoff]]&lt;br /&gt;
*[[$not]]&lt;br /&gt;
*[[$or]]&lt;br /&gt;
*[[$xor]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Text and Number Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Timer&amp;diff=1287</id>
		<title>Timer</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Timer&amp;diff=1287"/>
		<updated>2005-12-02T22:29:58Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: changed to wiki-pipe-tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Activates the specified timer to perform the specified command at a specified interval, and optionally at a specified time.&lt;br /&gt;
 /timer[N/name] [-ceomhipr] [time] &amp;lt;repetitions&amp;gt; &amp;lt;interval&amp;gt; &amp;lt;command&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are not connected to a server and a timer is started, it will be an offline timer by default, meaning that it will continue to run whether you are connected to a server on not. If you aren&#039;t connected to a server while starting a timer, it will be an online timer, that will stop if you disconnect. You can make a timer being an offline timer by using the -o switch.&lt;br /&gt;
&lt;br /&gt;
To make a new timer, you can either use /timer without name/number or you can specify a name,  without space between the command and the name (/timerfoo ...). If you do not specify a name/number, mIRC will get the first free timernumber it finds and use this.&lt;br /&gt;
&lt;br /&gt;
If you specify a delay of 0 seconds, the timer will trigger immediately after the calling script ends.&lt;br /&gt;
&lt;br /&gt;
You can also specify a time when the timer is supposed to trigger (see example below).&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that if you specify 0 repetitions it will continue until you either stop it yourself or you disconnect, in case it is an online timer.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that identifiers usually &#039;&#039;&#039;do not&#039;&#039;&#039; get re-evaluated during a timer (see example below). To force this, you have to use an exclamation mark after the &#039;&#039;$&#039;&#039; of an identifier (e.g. [[$time|$!time]] or [[$me|$!me]])&lt;br /&gt;
&lt;br /&gt;
You can &#039;&#039;&#039;stop&#039;&#039;&#039; a timer by using &#039;&#039;/timer&amp;lt;name|N&amp;gt; off&#039;&#039;, which will also be able to handle wildcards in the name (see example below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use the following switches:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| width=&amp;quot;10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || width=&amp;quot;90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Explanation&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | c || will make mIRC &amp;quot;catch up&amp;quot; a timer by executing it more than once during one interval if the real-time interval isn&#039;t matching your requested interval.&lt;br /&gt;
|-&lt;br /&gt;
| m / h || indicates that the interval delay is in milliseconds.&lt;br /&gt;
|-&lt;br /&gt;
| h || make a high-resolution multimedia timer (uses system resources heavily)&lt;br /&gt;
|-&lt;br /&gt;
| e || will executes the command associated with the specified timer name (works with wildcard names too).&lt;br /&gt;
|-&lt;br /&gt;
| p || will pause a timer&lt;br /&gt;
|-&lt;br /&gt;
| r || will resume a timer&lt;br /&gt;
|-&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | i || will make a timer dynamically associate with whatever happens to be the active connection. If a server window is closed, the timer is associated with the next available server window.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
In the following, we&#039;ll always create an [[alias]] to be able to execute commands directly after creating the timer.&lt;br /&gt;
&lt;br /&gt;
 alias timertest {&lt;br /&gt;
  timer 2 2 { [[echo]] -a moo! }&lt;br /&gt;
 }&lt;br /&gt;
This alias just creates an timer that will echo &#039;&#039;moo!&#039;&#039; to your active window two times with a delay of 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 alias timertest {&lt;br /&gt;
  timer1 2 10 { echo -a [[$asctime|$!asctime]] }&lt;br /&gt;
  timer2 2 10 { echo -a $asctime }&lt;br /&gt;
 }&lt;br /&gt;
Here we create two timers, one with forcing it to re-evaluate the identifier (the one on top), the other not. You will see the first always echoing the current time, the other always echoing the time when it was started.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
 alias timertest {&lt;br /&gt;
  timermilli -m 10 50 { echo -a The difference are 50 milliseconds. }&lt;br /&gt;
 }&lt;br /&gt;
This timer called milli will echo &#039;&#039;The difference are 50 milliseconds.&#039;&#039; every 0,05 seconds to your active window, all in all 10 times.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 alias timertest {&lt;br /&gt;
  timertime 14:00 1 1 { echo -a It is 14:00 o&#039;clock. }&lt;br /&gt;
 }&lt;br /&gt;
This one will echo &#039;&#039;It is 14:00 o&#039;clock.&#039;&#039; to the active window when it is 14oclock, as we made the timer trigger then.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 timer1* off&lt;br /&gt;
We just stop all timers beginning with a 1.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
To stop all timers, take a look at [[timers|/timers]].&lt;br /&gt;
&lt;br /&gt;
You can also get information about a timer, using the [[$timer]] identifier.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
[[Category:Timer Commands and Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Echo&amp;diff=1957</id>
		<title>Echo</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Echo&amp;diff=1957"/>
		<updated>2005-12-02T12:39:00Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: changed to wiki-pipe-tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Prints text in the specified window using the specified color.&lt;br /&gt;
 /echo [color] [-cdeghiNtsaqlbfnmr] [color name] [#channel|[=]nick] &amp;lt;text&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || style=&amp;quot;width:90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| s      || If a channel/nickname isn&#039;t specified, it echoes to the status window.&lt;br /&gt;
|-&lt;br /&gt;
| d      || If a channel/nickname isn&#039;t specified, it echoes to the single message window.&lt;br /&gt;
|-&lt;br /&gt;
| a      || If a channel/nickname isn&#039;t specified, it echoes to the active window.&lt;br /&gt;
|-&lt;br /&gt;
| e      || Encloses the line in the line spearators.&lt;br /&gt;
|-&lt;br /&gt;
| iN     || Indents the wrapped line by N characters.&lt;br /&gt;
|-&lt;br /&gt;
| h      || Forces lines to hard-wrap so resizing the window doesn&#039;t change the line.&lt;br /&gt;
|-&lt;br /&gt;
| t      || Prefixes the line with a timestamp if global time stamping is on or timestamping is on for that window.&lt;br /&gt;
|-&lt;br /&gt;
| q      || Makes it not display the text if called from an alias using the . prefix.&lt;br /&gt;
|-&lt;br /&gt;
| l      || Makes it apply the highlight settings to the line that&#039;s displayed.&lt;br /&gt;
|-&lt;br /&gt;
| bf     || Make it apply the beep/flash settings in the window it is echoing to.&lt;br /&gt;
|-&lt;br /&gt;
| n      || Prevents the echo from hiliting the window switchbar icon.&lt;br /&gt;
|-&lt;br /&gt;
| m      || Indicates that the line should be treated as a user message, not an event.&lt;br /&gt;
|-&lt;br /&gt;
| g      || Prevents the line from being logged to the log file.&lt;br /&gt;
|-&lt;br /&gt;
| r      || Applies the strip settings in the messages dialog.&lt;br /&gt;
|-&lt;br /&gt;
| c      || Uses the specified color name from the colors dialog.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Note&#039;&#039;&#039; that this text is only displayed in your own window and isn&#039;t sent to the server.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 /echo -a moo&lt;br /&gt;
This will print moo to the active window.&lt;br /&gt;
 /echo -sb moo&lt;br /&gt;
This will print moo to the status window and applies the beep setting in the window.&lt;br /&gt;
 /echo 0 -g #help.script moo&lt;br /&gt;
This will print moo to the #help.script channel window in white with preventing it from logging to the log file.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* Take a look on [[How do I customize mIRC&#039;s own output|How do I customize mIRC&#039;s own output]] by using echo at category [[:Category:Tutorials|Tutorials]].&lt;br /&gt;
* Take a look on [[Custom Windows]] to see how to print text to it.&lt;br /&gt;
[[Category:Commands]]&lt;br /&gt;
* [[Control_Codes]] for more information about colors.&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1152</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1152"/>
		<updated>2005-12-01T12:10:28Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: /* isletter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 [[#==|==]]        equal to&lt;br /&gt;
 [[#==|===]]       equal to (case-sensitive)&lt;br /&gt;
 [[#!=|!=]]        not equal to&lt;br /&gt;
 [[#&amp;lt;|&amp;lt;]]         less than&lt;br /&gt;
 [[#&amp;gt;|&amp;gt;]]         larger than&lt;br /&gt;
 [[#&amp;lt;=|&amp;gt;=]]        less than or equal to&lt;br /&gt;
 [[#&amp;gt;=|&amp;gt;=]]        larger than or equal to&lt;br /&gt;
 [[#//|//]]        v2 is a multiple of v1&lt;br /&gt;
 [[#\\|\\]]        v2 is not a multiple of v1&lt;br /&gt;
 [[#&amp;amp;|&amp;amp;]]         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#isin|isin]]      string v1 is in string v2&lt;br /&gt;
 [[#isin|isincs]]    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 [[#iswm|iswmcs]]    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 [[#isnum|isnum]]     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 [[#isletter|isletter]]  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 [[#isalnum|isalnum]]   text contains only letters and numbers&lt;br /&gt;
 [[#isalpha|isalpha]]   text contains only letters&lt;br /&gt;
 [[#islower|islower]]   text contains only lower case letters&lt;br /&gt;
 [[#isupper|isupper]]   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 [[#ison|ison]]      if v1 is on channel v2&lt;br /&gt;
 [[#isop|isop]]      if v1 is an op on channel v2&lt;br /&gt;
 [[#ishop|ishop]]     if v1 is a halfop on channel v2&lt;br /&gt;
 [[#isvoice|isvoice]]   if v1 has a voice on channel v2&lt;br /&gt;
 [[#isreg|isreg]]     if v1 is a normal nick on channel v2&lt;br /&gt;
 [[#ischan|ischan]]    if v1 is a channel which you are on.&lt;br /&gt;
 [[#isban|isban]]     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 [[#isaop|isaop]]     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isavoice|isavoice]]  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isignore|isignore]]  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 [[#isprotect|isprotect]] if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isnotify|isnotify]]  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; To negate an operator you can prefix it with an exclamation mark (!).&lt;br /&gt;
&lt;br /&gt;
=== == ===&lt;br /&gt;
 if (cat == cAt)  ;Returns true since == is case-insensitive.&lt;br /&gt;
 if (cat === cAt) ;Returns false since === is case-sensitive.&lt;br /&gt;
The above checks that v1 (cat) matches v2 (cAt).&lt;br /&gt;
&lt;br /&gt;
=== != ===&lt;br /&gt;
 if (cat != cAt)  ;Returns false since != is case-insensitive and both values v1 and v2 are equal.&lt;br /&gt;
 if (cat !== cAt) ;Returns true since !== is case-sensitive and both values v1 and v2 are not equal when case is taken in to consideration.&lt;br /&gt;
The != and !== operators are the negates of the == and === operators.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt; ===&lt;br /&gt;
 if (6 &amp;lt; 9) ;Returns true because the numerical value 6 is less than 9.&lt;br /&gt;
Checks that v1 (6) has a lower numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt; ===&lt;br /&gt;
 if (6 &amp;gt; 9) ;Returns false because the numerical value 6 is not greater than 9.&lt;br /&gt;
Checks that v1 (6) has a higher numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;= ===&lt;br /&gt;
 if (6 &amp;lt;= 9) ;Returns true because the numerical value 6 is less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a lower or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt;= ===&lt;br /&gt;
 if (6 &amp;gt;= 9) ;Returns false because the numerical value 6 is not less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a greater or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== // ===&lt;br /&gt;
 if (3 // 9) ;Returns true because 3 is a multipul of 9.&lt;br /&gt;
Multipuls of 9 are numbers that when devided in to 9 result in an integer.&lt;br /&gt;
You are not limited to positive numbers.&lt;br /&gt;
&lt;br /&gt;
=== \\ ===&lt;br /&gt;
 if (3 \\ 9) ;Returns false because 3 is a multipul of 9.&lt;br /&gt;
\\ is the negate of //&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp; ===&lt;br /&gt;
=== isin ===&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
 if (cat isin [[$1-]]) &lt;br /&gt;
Matches for &amp;quot;a &#039;&#039;cat&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;cat&#039;&#039;alog&amp;quot;, &amp;quot;impli&#039;&#039;cat&#039;&#039;e &amp;quot; and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== iswm ===&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0 or more characters&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (atleast 1 or more non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (home*away*lost iswm $1-)&lt;br /&gt;
This would match anything starting with home and ending in lost, with away being between home and lost.&lt;br /&gt;
It would match, &amp;quot;homeawaylost&amp;quot;, &amp;quot;home away lost&amp;quot;, &amp;quot;home is missed when you are away or lost&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
Requires one character after &amp;quot;ca&amp;quot; and allows 0 or more character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
Matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
Examples would be, &amp;quot;I love you&amp;quot;, &amp;quot;I hate you&amp;quot;, &amp;quot;I Moo You&amp;quot;, it would not however match, &amp;quot;I dont love you&amp;quot; since &amp;quot;dont love&amp;quot; contains a space.&lt;br /&gt;
&lt;br /&gt;
=== isnum ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum)  ;Returns true if $1 is of numeric value&lt;br /&gt;
 if ($1 isnum 10-)  ;Returns true if $1 is number higher than 10&lt;br /&gt;
 if ($1 isnum 20-30)  ;Returns true if $1 is a number between 20 and 30&lt;br /&gt;
&lt;br /&gt;
The Examples above checks $1 if, is it a number?, is it a number above 10?, is it a number between 20 and 30?&lt;br /&gt;
&lt;br /&gt;
=== isletter ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isletter)  ;Returns true if &#039;&#039;$1&#039;&#039; is a letter, any letter&lt;br /&gt;
 if ($1 isletter abcdefg)  ;Returns true if &#039;&#039;$1&#039;&#039; is in the string of letters &#039;&#039;abcdefg&#039;&#039;&lt;br /&gt;
 if ($1 isletter HelloWorld)  ;Returns true if &#039;&#039;$1&#039;&#039; is in the string of letters &#039;&#039;HeloWrd&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* Note that the checking is case-sensitive, the letter &#039;&#039;h&#039;&#039; will not return true if checked against the string &#039;&#039;HelloWorld&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== isalnum ===&lt;br /&gt;
=== isalpha ===&lt;br /&gt;
=== islower ===&lt;br /&gt;
=== isupper ===&lt;br /&gt;
=== ison ===&lt;br /&gt;
=== isop ===&lt;br /&gt;
=== ishop ===&lt;br /&gt;
=== isvoice ===&lt;br /&gt;
=== isreg ===&lt;br /&gt;
=== ischan ===&lt;br /&gt;
=== isban ===&lt;br /&gt;
=== isaop ===&lt;br /&gt;
=== isavoice ===&lt;br /&gt;
=== isignore ===&lt;br /&gt;
=== isprotect ===&lt;br /&gt;
=== isnotify ===&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1149</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1149"/>
		<updated>2005-11-30T21:54:10Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: /* isnum */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 [[#==|==]]        equal to&lt;br /&gt;
 [[#==|===]]       equal to (case-sensitive)&lt;br /&gt;
 [[#!=|!=]]        not equal to&lt;br /&gt;
 [[#&amp;lt;|&amp;lt;]]         less than&lt;br /&gt;
 [[#&amp;gt;|&amp;gt;]]         larger than&lt;br /&gt;
 [[#&amp;lt;=|&amp;gt;=]]        less than or equal to&lt;br /&gt;
 [[#&amp;gt;=|&amp;gt;=]]        larger than or equal to&lt;br /&gt;
 [[#//|//]]        v2 is a multiple of v1&lt;br /&gt;
 [[#\\|\\]]        v2 is not a multiple of v1&lt;br /&gt;
 [[#&amp;amp;|&amp;amp;]]         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#isin|isin]]      string v1 is in string v2&lt;br /&gt;
 [[#isin|isincs]]    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 [[#iswm|iswmcs]]    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 [[#isnum|isnum]]     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 [[#isletter|isletter]]  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 [[#isalnum|isalnum]]   text contains only letters and numbers&lt;br /&gt;
 [[#isalpha|isalpha]]   text contains only letters&lt;br /&gt;
 [[#islower|islower]]   text contains only lower case letters&lt;br /&gt;
 [[#isupper|isupper]]   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 [[#ison|ison]]      if v1 is on channel v2&lt;br /&gt;
 [[#isop|isop]]      if v1 is an op on channel v2&lt;br /&gt;
 [[#ishop|ishop]]     if v1 is a halfop on channel v2&lt;br /&gt;
 [[#isvoice|isvoice]]   if v1 has a voice on channel v2&lt;br /&gt;
 [[#isreg|isreg]]     if v1 is a normal nick on channel v2&lt;br /&gt;
 [[#ischan|ischan]]    if v1 is a channel which you are on.&lt;br /&gt;
 [[#isban|isban]]     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 [[#isaop|isaop]]     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isavoice|isavoice]]  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isignore|isignore]]  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 [[#isprotect|isprotect]] if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isnotify|isnotify]]  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; To negate an operator you can prefix it with an exclamation mark (!).&lt;br /&gt;
&lt;br /&gt;
=== == ===&lt;br /&gt;
 if (cat == cAt)  ;Returns true since == is case-insensitive.&lt;br /&gt;
 if (cat === cAt) ;Returns false since === is case-sensitive.&lt;br /&gt;
The above checks that v1 (cat) matches v2 (cAt).&lt;br /&gt;
&lt;br /&gt;
=== != ===&lt;br /&gt;
 if (cat != cAt)  ;Returns false since != is case-insensitive and both values v1 and v2 are equal.&lt;br /&gt;
 if (cat !== cAt) ;Returns true since !== is case-sensitive and both values v1 and v2 are not equal when case is taken in to consideration.&lt;br /&gt;
The != and !== operators are the negates of the == and === operators.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt; ===&lt;br /&gt;
 if (6 &amp;lt; 9) ;Returns true because the numerical value 6 is less than 9.&lt;br /&gt;
Checks that v1 (6) has a lower numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt; ===&lt;br /&gt;
 if (6 &amp;gt; 9) ;Returns false because the numerical value 6 is not greater than 9.&lt;br /&gt;
Checks that v1 (6) has a higher numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;= ===&lt;br /&gt;
 if (6 &amp;lt;= 9) ;Returns true because the numerical value 6 is less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a lower or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt;= ===&lt;br /&gt;
 if (6 &amp;gt;= 9) ;Returns false because the numerical value 6 is not less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a greater or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== // ===&lt;br /&gt;
 if (3 // 9) ;Returns true because 3 is a multipul of 9.&lt;br /&gt;
Multipuls of 9 are numbers that when devided in to 9 result in an integer.&lt;br /&gt;
You are not limited to positive numbers.&lt;br /&gt;
&lt;br /&gt;
=== \\ ===&lt;br /&gt;
 if (3 \\ 9) ;Returns false because 3 is a multipul of 9.&lt;br /&gt;
\\ is the negate of //&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp; ===&lt;br /&gt;
=== isin ===&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
 if (cat isin [[$1-]]) &lt;br /&gt;
Matches for &amp;quot;a &#039;&#039;cat&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;cat&#039;&#039;alog&amp;quot;, &amp;quot;impli&#039;&#039;cat&#039;&#039;e &amp;quot; and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== iswm ===&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0 or more characters&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (atleast 1 or more non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (home*away*lost iswm $1-)&lt;br /&gt;
This would match anything starting with home and ending in lost, with away being between home and lost.&lt;br /&gt;
It would match, &amp;quot;homeawaylost&amp;quot;, &amp;quot;home away lost&amp;quot;, &amp;quot;home is missed when you are away or lost&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
Requires one character after &amp;quot;ca&amp;quot; and allows 0 or more character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
Matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
Examples would be, &amp;quot;I love you&amp;quot;, &amp;quot;I hate you&amp;quot;, &amp;quot;I Moo You&amp;quot;, it would not however match, &amp;quot;I dont love you&amp;quot; since &amp;quot;dont love&amp;quot; contains a space.&lt;br /&gt;
&lt;br /&gt;
=== isnum ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum)  ;Returns true if $1 is of numeric value&lt;br /&gt;
 if ($1 isnum 10-)  ;Returns true if $1 is number higher than 10&lt;br /&gt;
 if ($1 isnum 20-30)  ;Returns true if $1 is a number between 20 and 30&lt;br /&gt;
&lt;br /&gt;
The Examples above checks $1 if, is it a number?, is it a number above 10?, is it a number between 20 and 30?&lt;br /&gt;
&lt;br /&gt;
=== isletter ===&lt;br /&gt;
=== isalnum ===&lt;br /&gt;
=== isalpha ===&lt;br /&gt;
=== islower ===&lt;br /&gt;
=== isupper ===&lt;br /&gt;
=== ison ===&lt;br /&gt;
=== isop ===&lt;br /&gt;
=== ishop ===&lt;br /&gt;
=== isvoice ===&lt;br /&gt;
=== isreg ===&lt;br /&gt;
=== ischan ===&lt;br /&gt;
=== isban ===&lt;br /&gt;
=== isaop ===&lt;br /&gt;
=== isavoice ===&lt;br /&gt;
=== isignore ===&lt;br /&gt;
=== isprotect ===&lt;br /&gt;
=== isnotify ===&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1148</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1148"/>
		<updated>2005-11-30T21:51:38Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: /* isnum */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 [[#==|==]]        equal to&lt;br /&gt;
 [[#==|===]]       equal to (case-sensitive)&lt;br /&gt;
 [[#!=|!=]]        not equal to&lt;br /&gt;
 [[#&amp;lt;|&amp;lt;]]         less than&lt;br /&gt;
 [[#&amp;gt;|&amp;gt;]]         larger than&lt;br /&gt;
 [[#&amp;lt;=|&amp;gt;=]]        less than or equal to&lt;br /&gt;
 [[#&amp;gt;=|&amp;gt;=]]        larger than or equal to&lt;br /&gt;
 [[#//|//]]        v2 is a multiple of v1&lt;br /&gt;
 [[#\\|\\]]        v2 is not a multiple of v1&lt;br /&gt;
 [[#&amp;amp;|&amp;amp;]]         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#isin|isin]]      string v1 is in string v2&lt;br /&gt;
 [[#isin|isincs]]    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 [[#iswm|iswmcs]]    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 [[#isnum|isnum]]     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 [[#isletter|isletter]]  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 [[#isalnum|isalnum]]   text contains only letters and numbers&lt;br /&gt;
 [[#isalpha|isalpha]]   text contains only letters&lt;br /&gt;
 [[#islower|islower]]   text contains only lower case letters&lt;br /&gt;
 [[#isupper|isupper]]   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 [[#ison|ison]]      if v1 is on channel v2&lt;br /&gt;
 [[#isop|isop]]      if v1 is an op on channel v2&lt;br /&gt;
 [[#ishop|ishop]]     if v1 is a halfop on channel v2&lt;br /&gt;
 [[#isvoice|isvoice]]   if v1 has a voice on channel v2&lt;br /&gt;
 [[#isreg|isreg]]     if v1 is a normal nick on channel v2&lt;br /&gt;
 [[#ischan|ischan]]    if v1 is a channel which you are on.&lt;br /&gt;
 [[#isban|isban]]     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 [[#isaop|isaop]]     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isavoice|isavoice]]  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isignore|isignore]]  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 [[#isprotect|isprotect]] if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isnotify|isnotify]]  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; To negate an operator you can prefix it with an exclamation mark (!).&lt;br /&gt;
&lt;br /&gt;
=== == ===&lt;br /&gt;
 if (cat == cAt)  ;Returns true since == is case-insensitive.&lt;br /&gt;
 if (cat === cAt) ;Returns false since === is case-sensitive.&lt;br /&gt;
The above checks that v1 (cat) matches v2 (cAt).&lt;br /&gt;
&lt;br /&gt;
=== != ===&lt;br /&gt;
 if (cat != cAt)  ;Returns false since != is case-insensitive and both values v1 and v2 are equal.&lt;br /&gt;
 if (cat !== cAt) ;Returns true since !== is case-sensitive and both values v1 and v2 are not equal when case is taken in to consideration.&lt;br /&gt;
The != and !== operators are the negates of the == and === operators.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt; ===&lt;br /&gt;
 if (6 &amp;lt; 9) ;Returns true because the numerical value 6 is less than 9.&lt;br /&gt;
Checks that v1 (6) has a lower numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt; ===&lt;br /&gt;
 if (6 &amp;gt; 9) ;Returns false because the numerical value 6 is not greater than 9.&lt;br /&gt;
Checks that v1 (6) has a higher numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;= ===&lt;br /&gt;
 if (6 &amp;lt;= 9) ;Returns true because the numerical value 6 is less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a lower or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt;= ===&lt;br /&gt;
 if (6 &amp;gt;= 9) ;Returns false because the numerical value 6 is not less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a greater or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== // ===&lt;br /&gt;
 if (3 // 9) ;Returns true because 3 is a multipul of 9.&lt;br /&gt;
Multipuls of 9 are numbers that when devided in to 9 result in an integer.&lt;br /&gt;
You are not limited to positive numbers.&lt;br /&gt;
&lt;br /&gt;
=== \\ ===&lt;br /&gt;
 if (3 \\ 9) ;Returns false because 3 is a multipul of 9.&lt;br /&gt;
\\ is the negate of //&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp; ===&lt;br /&gt;
=== isin ===&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
 if (cat isin [[$1-]]) &lt;br /&gt;
Matches for &amp;quot;a &#039;&#039;cat&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;cat&#039;&#039;alog&amp;quot;, &amp;quot;impli&#039;&#039;cat&#039;&#039;e &amp;quot; and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== iswm ===&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0 or more characters&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (atleast 1 or more non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (home*away*lost iswm $1-)&lt;br /&gt;
This would match anything starting with home and ending in lost, with away being between home and lost.&lt;br /&gt;
It would match, &amp;quot;homeawaylost&amp;quot;, &amp;quot;home away lost&amp;quot;, &amp;quot;home is missed when you are away or lost&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
Requires one character after &amp;quot;ca&amp;quot; and allows 0 or more character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
Matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
Examples would be, &amp;quot;I love you&amp;quot;, &amp;quot;I hate you&amp;quot;, &amp;quot;I Moo You&amp;quot;, it would not however match, &amp;quot;I dont love you&amp;quot; since &amp;quot;dont love&amp;quot; contains a space.&lt;br /&gt;
&lt;br /&gt;
=== isnum ===&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum)&lt;br /&gt;
&lt;br /&gt;
Statement is true if $1 is of numeric value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum 10-)&lt;br /&gt;
&lt;br /&gt;
Statement is true if $1 is number higher than 10&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if ($1 isnum 20-30)&lt;br /&gt;
&lt;br /&gt;
Statement is true if $1 is a number between 20 and 30&lt;br /&gt;
&lt;br /&gt;
=== isletter ===&lt;br /&gt;
=== isalnum ===&lt;br /&gt;
=== isalpha ===&lt;br /&gt;
=== islower ===&lt;br /&gt;
=== isupper ===&lt;br /&gt;
=== ison ===&lt;br /&gt;
=== isop ===&lt;br /&gt;
=== ishop ===&lt;br /&gt;
=== isvoice ===&lt;br /&gt;
=== isreg ===&lt;br /&gt;
=== ischan ===&lt;br /&gt;
=== isban ===&lt;br /&gt;
=== isaop ===&lt;br /&gt;
=== isavoice ===&lt;br /&gt;
=== isignore ===&lt;br /&gt;
=== isprotect ===&lt;br /&gt;
=== isnotify ===&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1147</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1147"/>
		<updated>2005-11-30T21:47:55Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: made the casesens operators link down aswell&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 [[#==|==]]        equal to&lt;br /&gt;
 [[#==|===]]       equal to (case-sensitive)&lt;br /&gt;
 [[#!=|!=]]        not equal to&lt;br /&gt;
 [[#&amp;lt;|&amp;lt;]]         less than&lt;br /&gt;
 [[#&amp;gt;|&amp;gt;]]         larger than&lt;br /&gt;
 [[#&amp;lt;=|&amp;gt;=]]        less than or equal to&lt;br /&gt;
 [[#&amp;gt;=|&amp;gt;=]]        larger than or equal to&lt;br /&gt;
 [[#//|//]]        v2 is a multiple of v1&lt;br /&gt;
 [[#\\|\\]]        v2 is not a multiple of v1&lt;br /&gt;
 [[#&amp;amp;|&amp;amp;]]         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#isin|isin]]      string v1 is in string v2&lt;br /&gt;
 [[#isin|isincs]]    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 [[#iswm|iswmcs]]    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 [[#isnum|isnum]]     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 [[#isletter|isletter]]  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 [[#isalnum|isalnum]]   text contains only letters and numbers&lt;br /&gt;
 [[#isalpha|isalpha]]   text contains only letters&lt;br /&gt;
 [[#islower|islower]]   text contains only lower case letters&lt;br /&gt;
 [[#isupper|isupper]]   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 [[#ison|ison]]      if v1 is on channel v2&lt;br /&gt;
 [[#isop|isop]]      if v1 is an op on channel v2&lt;br /&gt;
 [[#ishop|ishop]]     if v1 is a halfop on channel v2&lt;br /&gt;
 [[#isvoice|isvoice]]   if v1 has a voice on channel v2&lt;br /&gt;
 [[#isreg|isreg]]     if v1 is a normal nick on channel v2&lt;br /&gt;
 [[#ischan|ischan]]    if v1 is a channel which you are on.&lt;br /&gt;
 [[#isban|isban]]     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 [[#isaop|isaop]]     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isavoice|isavoice]]  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isignore|isignore]]  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 [[#isprotect|isprotect]] if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 [[#isnotify|isnotify]]  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; To negate an operator you can prefix it with an exclamation mark (!).&lt;br /&gt;
&lt;br /&gt;
=== == ===&lt;br /&gt;
 if (cat == cAt)  ;Returns true since == is case-insensitive.&lt;br /&gt;
 if (cat === cAt) ;Returns false since === is case-sensitive.&lt;br /&gt;
The above checks that v1 (cat) matches v2 (cAt).&lt;br /&gt;
&lt;br /&gt;
=== != ===&lt;br /&gt;
 if (cat != cAt)  ;Returns false since != is case-insensitive and both values v1 and v2 are equal.&lt;br /&gt;
 if (cat !== cAt) ;Returns true since !== is case-sensitive and both values v1 and v2 are not equal when case is taken in to consideration.&lt;br /&gt;
The != and !== operators are the negates of the == and === operators.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt; ===&lt;br /&gt;
 if (6 &amp;lt; 9) ;Returns true because the numerical value 6 is less than 9.&lt;br /&gt;
Checks that v1 (6) has a lower numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt; ===&lt;br /&gt;
 if (6 &amp;gt; 9) ;Returns false because the numerical value 6 is not greater than 9.&lt;br /&gt;
Checks that v1 (6) has a higher numerical value than v2 (9)&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;= ===&lt;br /&gt;
 if (6 &amp;lt;= 9) ;Returns true because the numerical value 6 is less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a lower or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== &amp;gt;= ===&lt;br /&gt;
 if (6 &amp;gt;= 9) ;Returns false because the numerical value 6 is not less than or equal to 9.&lt;br /&gt;
Checks that v1 (6) has a greater or equal numerical value than v2 (9).&lt;br /&gt;
&lt;br /&gt;
=== // ===&lt;br /&gt;
 if (3 // 9) ;Returns true because 3 is a multipul of 9.&lt;br /&gt;
Multipuls of 9 are numbers that when devided in to 9 result in an integer.&lt;br /&gt;
You are not limited to positive numbers.&lt;br /&gt;
&lt;br /&gt;
=== \\ ===&lt;br /&gt;
 if (3 \\ 9) ;Returns false because 3 is a multipul of 9.&lt;br /&gt;
\\ is the negate of //&lt;br /&gt;
&lt;br /&gt;
=== &amp;amp; ===&lt;br /&gt;
=== isin ===&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
 if (cat isin [[$1-]]) &lt;br /&gt;
Matches for &amp;quot;a &#039;&#039;cat&#039;&#039;&amp;quot;, &amp;quot;&#039;&#039;cat&#039;&#039;alog&amp;quot;, &amp;quot;impli&#039;&#039;cat&#039;&#039;e &amp;quot; and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== iswm ===&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0 or more characters&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (atleast 1 or more non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (home*away*lost iswm $1-)&lt;br /&gt;
This would match anything starting with home and ending in lost, with away being between home and lost.&lt;br /&gt;
It would match, &amp;quot;homeawaylost&amp;quot;, &amp;quot;home away lost&amp;quot;, &amp;quot;home is missed when you are away or lost&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
Requires one character after &amp;quot;ca&amp;quot; and allows 0 or more character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
Matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
Examples would be, &amp;quot;I love you&amp;quot;, &amp;quot;I hate you&amp;quot;, &amp;quot;I Moo You&amp;quot;, it would not however match, &amp;quot;I dont love you&amp;quot; since &amp;quot;dont love&amp;quot; contains a space.&lt;br /&gt;
&lt;br /&gt;
=== isnum ===&lt;br /&gt;
=== isletter ===&lt;br /&gt;
=== isalnum ===&lt;br /&gt;
=== isalpha ===&lt;br /&gt;
=== islower ===&lt;br /&gt;
=== isupper ===&lt;br /&gt;
=== ison ===&lt;br /&gt;
=== isop ===&lt;br /&gt;
=== ishop ===&lt;br /&gt;
=== isvoice ===&lt;br /&gt;
=== isreg ===&lt;br /&gt;
=== ischan ===&lt;br /&gt;
=== isban ===&lt;br /&gt;
=== isaop ===&lt;br /&gt;
=== isavoice ===&lt;br /&gt;
=== isignore ===&lt;br /&gt;
=== isprotect ===&lt;br /&gt;
=== isnotify ===&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1918</id>
		<title>Set</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1918"/>
		<updated>2005-11-30T13:43:13Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: fu saturn&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sets the value of %variable to the specified value.&lt;br /&gt;
 /set [-lsnzuN] &amp;lt;%variable&amp;gt; [value]&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || Style=&amp;quot;width:90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| l      || Sets %var as a local variable, same as using /[[var]] (Deprecated, use /var)&lt;br /&gt;
|-&lt;br /&gt;
| s      || Gives an output: * Set %var to value.&lt;br /&gt;
|-&lt;br /&gt;
| n      || Treats value as plain text.&lt;br /&gt;
|-&lt;br /&gt;
| z      || Decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
|-&lt;br /&gt;
| uN     || Unsets %var after N seconds, as long as %var isn&#039;t set again. If N is 0, it is unset when script finishes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 set %fuu bar&lt;br /&gt;
 set %moo [ $+ [ %fuu ] ] 42&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and then set &#039;&#039;%moobar&#039;&#039; to &#039;&#039;42&#039;&#039;, as the variable &#039;&#039;%fuu&#039;&#039; will first be evaluated to &#039;&#039;bar&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -u3 %fuu bar&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and unset it after &#039;&#039;3&#039;&#039; seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -s %fuu 3&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;3&#039;&#039; and give an output to the active window: &#039;&#039;* Set %fuu to 3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Unset|/unset]] unsets a variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Var|/var]] sets a local variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Unsetall|/unsetall]] unsets all variable from the variable list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]][[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1143</id>
		<title>Set</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1143"/>
		<updated>2005-11-30T13:41:52Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sets the value of %variable to the specified value.&lt;br /&gt;
 /set [-lsnzuN] &amp;lt;%variable&amp;gt; [value]&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || Style=&amp;quot;width:90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| l      || Sets %var as a local variable, same as using /[[var]] (Depreciated, use /var)&lt;br /&gt;
|-&lt;br /&gt;
| s      || Gives an output: * Set %var to value.&lt;br /&gt;
|-&lt;br /&gt;
| n      || Treats value as plain text.&lt;br /&gt;
|-&lt;br /&gt;
| z      || Decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
|-&lt;br /&gt;
| uN     || Unsets %var after N seconds, as long as %var isn&#039;t set again. If N is 0, it is unset when script finishes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 set %fuu bar&lt;br /&gt;
 set %moo [ $+ [ %fuu ] ] 42&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and then set &#039;&#039;%moobar&#039;&#039; to &#039;&#039;42&#039;&#039;, as the variable &#039;&#039;%fuu&#039;&#039; will first be evaluated to &#039;&#039;bar&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -u3 %fuu bar&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and unset it after &#039;&#039;3&#039;&#039; seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -s %fuu 3&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;3&#039;&#039; and give an output to the active window: &#039;&#039;* Set %fuu to 3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Unset|/unset]] unsets a variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Var|/var]] sets a local variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Unsetall|/unsetall]] unsets all variable from the variable list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]][[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1142</id>
		<title>Set</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1142"/>
		<updated>2005-11-30T13:41:17Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sets the value of %variable to the specified value.&lt;br /&gt;
 /set [-lsnzuN] &amp;lt;%variable&amp;gt; [value]&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || Style=&amp;quot;width:90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| l      || Sets %var as a local variable, same as using /[[var]] (Depreceated, use /var)&lt;br /&gt;
|-&lt;br /&gt;
| s      || Gives an output: * Set %var to value.&lt;br /&gt;
|-&lt;br /&gt;
| n      || Treats value as plain text.&lt;br /&gt;
|-&lt;br /&gt;
| z      || Decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
|-&lt;br /&gt;
| uN     || Unsets %var after N seconds, as long as %var isn&#039;t set again. If N is 0, it is unset when script finishes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 set %fuu bar&lt;br /&gt;
 set %moo [ $+ [ %fuu ] ] 42&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and then set &#039;&#039;%moobar&#039;&#039; to &#039;&#039;42&#039;&#039;, as the variable &#039;&#039;%fuu&#039;&#039; will first be evaluated to &#039;&#039;bar&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -u3 %fuu bar&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and unset it after &#039;&#039;3&#039;&#039; seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -s %fuu 3&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;3&#039;&#039; and give an output to the active window: &#039;&#039;* Set %fuu to 3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Unset|/unset]] unsets a variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Var|/var]] sets a local variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Unsetall|/unsetall]] unsets all variable from the variable list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]][[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1141</id>
		<title>Set</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Set&amp;diff=1141"/>
		<updated>2005-11-30T13:39:37Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added l parameter. changed to use wikipipe tables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sets the value of %variable to the specified value.&lt;br /&gt;
 /set [-lsnzuN] &amp;lt;%variable&amp;gt; [value]&lt;br /&gt;
{| style=&amp;quot;width:100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;width:10%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Switch&#039;&#039;&#039;&#039;&#039; || Style=&amp;quot;width:90%&amp;quot; | &#039;&#039;&#039;&#039;&#039;Meaning&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
|-&lt;br /&gt;
| l      || Sets %var as a local variable, same as using /[[var]]&lt;br /&gt;
|-&lt;br /&gt;
| s      || Gives an output: * Set %var to value.&lt;br /&gt;
|-&lt;br /&gt;
| n      || Treats value as plain text.&lt;br /&gt;
|-&lt;br /&gt;
| z      || Decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
|-&lt;br /&gt;
| uN     || Unsets %var after N seconds, as long as %var isn&#039;t set again. If N is 0, it is unset when script finishes.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 set %fuu bar&lt;br /&gt;
 set %moo [ $+ [ %fuu ] ] 42&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and then set &#039;&#039;%moobar&#039;&#039; to &#039;&#039;42&#039;&#039;, as the variable &#039;&#039;%fuu&#039;&#039; will first be evaluated to &#039;&#039;bar&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -u3 %fuu bar&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;bar&#039;&#039; and unset it after &#039;&#039;3&#039;&#039; seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 set -s %fuu 3&lt;br /&gt;
This will set &#039;&#039;%fuu&#039;&#039; to &#039;&#039;3&#039;&#039; and give an output to the active window: &#039;&#039;* Set %fuu to 3&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[Unset|/unset]] unsets a variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Var|/var]] sets a local variable.&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Unsetall|/unsetall]] unsets all variable from the variable list.&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]][[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Local_Variables&amp;diff=2149</id>
		<title>Local Variables</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Local_Variables&amp;diff=2149"/>
		<updated>2005-11-30T13:31:12Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: added see also (/set)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Local variables are variables that exist only for the duration of the piece of script (for example an alias or event) in which they are created, and can only be accessed from within &#039;&#039;that&#039;&#039; piece of script - not from other anywhere else, not even from the aliases that the piece of script calls. Local variables are removed automatically when the piece of script is finished, so it is not required to /[[unset]] them. Local variables are very useful for storing short-lived data, such as loop counters and temporary results.&lt;br /&gt;
&lt;br /&gt;
Local variables can be created with the /var command:&lt;br /&gt;
 var %myvar = somevalue&lt;br /&gt;
&lt;br /&gt;
Note that a local variable and a global variable (created with /[[set]]) with the same name may exist; in that case, the local variable will be used in the piece of script, and the global variable will not be changed.&lt;br /&gt;
&lt;br /&gt;
You can set multiple variables at once:&lt;br /&gt;
 var %x = foo, %y = bar&lt;br /&gt;
&lt;br /&gt;
Although the &#039;=&#039; can be left out from the /var command in some cases, it is bad practice to do so: it can lead to weird errors in other lines.&lt;br /&gt;
&lt;br /&gt;
You can use /var -s to make a variable show the result when a value is set.&lt;br /&gt;
&lt;br /&gt;
Do not use /var to create local variables with a dynamic name (e.g. &#039;&#039;%x [ $+ [ %y ] ]&#039;&#039;), there is a bug in mIRC that prevents you from doing this.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
First, let&#039;s create an [[Aliases|alias]] that&#039;s used later on.&lt;br /&gt;
 alias var_example { var -s %x = foo | set -s %y bar }&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s play around.&lt;br /&gt;
&lt;br /&gt;
 ; set values to variables with set so values exists until they&#039;re unset&lt;br /&gt;
 set %x 10&lt;br /&gt;
 set %y %x&lt;br /&gt;
 ; value from %x is copied to %y&lt;br /&gt;
 &lt;br /&gt;
 ; call of your own alias&lt;br /&gt;
 var_example&lt;br /&gt;
 ; displays&lt;br /&gt;
 ; * Set %x to foo&lt;br /&gt;
 ; * Set %y to bar&lt;br /&gt;
 &lt;br /&gt;
 ; now, let&#039;s display %x and %y values&lt;br /&gt;
 [[echo]] -a %x&lt;br /&gt;
 ; returns 10&lt;br /&gt;
 echo -a %y&lt;br /&gt;
 ; returns bar&lt;br /&gt;
&lt;br /&gt;
As we can see, %x still holds its original value because /var only creates a local variable, but %y was overwritten with /set.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[Set|/set]] is used when you want variables that exist between routines and aliases, call it global variables.&lt;br /&gt;
&lt;br /&gt;
{{Author|Tovrleaf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1145</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1145"/>
		<updated>2005-11-30T13:21:11Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: test - modify at will.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
== The Operators ==&lt;br /&gt;
&lt;br /&gt;
 ==        equal to&lt;br /&gt;
 ===       equal to (case-sensitive)&lt;br /&gt;
 !=        not equal to&lt;br /&gt;
 &amp;lt;         less than&lt;br /&gt;
 &amp;gt;         larger than&lt;br /&gt;
 &amp;gt;=        larger than or equal to&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;=        smaller than or equal to&lt;br /&gt;
 //        v2 is a multiple of v1&lt;br /&gt;
 \\        v2 is not a multiple of v1&lt;br /&gt;
 &amp;amp;         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 [[#Isin|isin]]      string v1 is in string v2&lt;br /&gt;
 isincs    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 [[#Iswm|iswm]]      wildcard string v1 matches string v2&lt;br /&gt;
 iswmcs    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 isnum     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 isletter  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 isalnum   text contains only letters and numbers&lt;br /&gt;
 isalpha   text contains only letters&lt;br /&gt;
 islower   text contains only lower case letters&lt;br /&gt;
 isupper   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 ison      nickname v1 is on channel v2&lt;br /&gt;
 isop      nickname v1 is an op on channel v2&lt;br /&gt;
 ishop     nickname v1 is a halfop on channel v2&lt;br /&gt;
 isvoice   nickname v1 has a voice on channel v2&lt;br /&gt;
 isreg     nickname v1 is a normal nick on channel v2&lt;br /&gt;
 ischan    if v1 is a channel which you are on.&lt;br /&gt;
 isban     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 isaop     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 isavoice  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 isignore  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 isprotect if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 isnotify  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
To negate an operator you can prefix it with an ! exclamation mark.&lt;br /&gt;
&lt;br /&gt;
==== Isin ====&lt;br /&gt;
&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
matches for &amp;quot;a cat&amp;quot;, catalog and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==== Iswm ====&lt;br /&gt;
&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0..N character&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (1-N non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (*bat* iswm $1-)&lt;br /&gt;
allows a character before the string and after it, but there&#039;s no need for it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
requires one character after &amp;quot;ca&amp;quot; and allows 0..N character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Wildcard]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1138</id>
		<title>If-Then-Else</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1138"/>
		<updated>2005-11-30T13:13:23Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: streamlined&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The If-then-else statement allows you to compare values and execute different parts of a script based on that comparison.&lt;br /&gt;
&lt;br /&gt;
 if (v1 operator v2) { commands1 }&lt;br /&gt;
 elseif (v1 operator v2) { commands2 }&lt;br /&gt;
 else { commands3 }&lt;br /&gt;
&lt;br /&gt;
If the first statement (line) is [[$true]], commands inside the first brackets are executed. If the first if-statement returns [[$false]], script starts looking for an elseif-statement. An elseif-statement is only triggered if the group&#039;s if-statement returned $false before. And at last, if none of the if or elseif statements were triggered, commands in else-statement are executed.&lt;br /&gt;
&lt;br /&gt;
One if structure/group can consist of one main if-statement, after it there can be 0 .. N elseif-statements. There can be only one else, which can be understood as the default statement, if none one before were triggered. There doesn&#039;t need to be else-statement though.&lt;br /&gt;
&lt;br /&gt;
Every if statement is handled separatly and none of others affect in another.&lt;br /&gt;
&lt;br /&gt;
 if (A) { ... }&lt;br /&gt;
 elseif (B) {&lt;br /&gt;
   if (C) { ... }&lt;br /&gt;
   elseif (D) { ... }&lt;br /&gt;
   elseif (E) { ... }&lt;br /&gt;
   else { F }&lt;br /&gt;
 }&lt;br /&gt;
 elseif (G) { ... }&lt;br /&gt;
 else { H }&lt;br /&gt;
&lt;br /&gt;
If structure would be hierarchical represented it would look something like this&lt;br /&gt;
&lt;br /&gt;
 A               If A is true, execute its commands and return&lt;br /&gt;
 B               If B is true, &lt;br /&gt;
  \&lt;br /&gt;
   C                 check if C, D or E returns true&lt;br /&gt;
   D&lt;br /&gt;
   E&lt;br /&gt;
   F             If none of these got triggered, return F&lt;br /&gt;
 G               G is checked only if A or B were not triggered&lt;br /&gt;
 H               If none of previous wasn&#039;t matches, H is returned&lt;br /&gt;
&lt;br /&gt;
=== The Operators ===&lt;br /&gt;
&lt;br /&gt;
 ==        equal to&lt;br /&gt;
 ===       equal to (case-sensitive)&lt;br /&gt;
 !=        not equal to&lt;br /&gt;
 &amp;lt;         less than&lt;br /&gt;
 &amp;gt;         larger than&lt;br /&gt;
 &amp;gt;=        larger than or equal to&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;=        smaller than or equal to&lt;br /&gt;
 //        v2 is a multiple of v1&lt;br /&gt;
 \\        v2 is not a multiple of v1&lt;br /&gt;
 &amp;amp;         bitwise comparison&lt;br /&gt;
 &lt;br /&gt;
 isin      string v1 is in string v2&lt;br /&gt;
 isincs    string v1 is in string v2 (case sensitive)&lt;br /&gt;
 iswm      wildcard string v1 matches string v2&lt;br /&gt;
 iswmcs    wildcard string v1 matches string v2 (case sensitive)&lt;br /&gt;
 isnum     number v1 is a number in the range v2 which is in the form n1-n2 (v2 optional)&lt;br /&gt;
 isletter  letter v1 is a letter in the list of letters in v2 (v2 optional)&lt;br /&gt;
 &lt;br /&gt;
 isalnum   text contains only letters and numbers&lt;br /&gt;
 isalpha   text contains only letters&lt;br /&gt;
 islower   text contains only lower case letters&lt;br /&gt;
 isupper   text contains only upper case letters&lt;br /&gt;
 &lt;br /&gt;
 ison      nickname v1 is on channel v2&lt;br /&gt;
 isop      nickname v1 is an op on channel v2&lt;br /&gt;
 ishop     nickname v1 is a halfop on channel v2&lt;br /&gt;
 isvoice   nickname v1 has a voice on channel v2&lt;br /&gt;
 isreg     nickname v1 is a normal nick on channel v2&lt;br /&gt;
 ischan    if v1 is a channel which you are on.&lt;br /&gt;
 isban     if v1 is a banned address in internal ban list&lt;br /&gt;
 &lt;br /&gt;
 isaop     if v1 is a user in your auto-op list for channel v2 (v2 optional)&lt;br /&gt;
 isavoice  if v1 is a user in your auto-voice list for channel v2 (v2 optional)&lt;br /&gt;
 isignore  if v1 is a user in your ignore list with the ignore switch v2 (v2 optional)&lt;br /&gt;
 isprotect if v1 is a user in your protect list for channel v2 (v2 optional)&lt;br /&gt;
 isnotify  if v1 is a user in your notify list.&lt;br /&gt;
&lt;br /&gt;
To negate an operator you can prefix it with an ! exclamation mark.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
 if (cat isin [[$1-]])&lt;br /&gt;
matches for &amp;quot;a cat&amp;quot;, catalog and any string where &amp;quot;cat&amp;quot; &#039;&#039;&#039;is in&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
iswm stands for &#039;&#039;is wildcard match&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Operators:&lt;br /&gt;
 *  0..N character&lt;br /&gt;
 ?  1 character&lt;br /&gt;
 &amp;amp;  1 word (1-N non-space characters)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (*bat* iswm $1-)&lt;br /&gt;
allows a character before the string and after it, but there&#039;s no need for it. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (ca?* iswm $1-)&lt;br /&gt;
requires one character after &amp;quot;ca&amp;quot; and allows 0..N character after it. So it would match for cat, cab, cabin etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 if (I &amp;amp; you iswm $1-)&lt;br /&gt;
matches any string that consists of &amp;quot;I + one word + you&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Not all comparations need two parameters:&lt;br /&gt;
 if ($1- isupper)&lt;br /&gt;
returns true, if $1- oly contain uppercase letters. So ABCD returns true, but even one lowercase letter makes it return false.&lt;br /&gt;
&lt;br /&gt;
== Combining comparisons ==&lt;br /&gt;
&lt;br /&gt;
You can combine comparisons by using the &amp;amp;&amp;amp; for AND and || for OR characters.&lt;br /&gt;
&lt;br /&gt;
 [[var]] %c = 5&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c &amp;gt; 0)      ; returns true because %c is both, smaller than 6 and greater than 0&lt;br /&gt;
 if (%c &amp;lt; 6) || (%c isalpha)  ; returns true because %c is lower than 6.&lt;br /&gt;
                              ; note that %c is not alphapetical and returns false, but || matches for 1 .. N true values.&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c isalpha)  ; returns false&lt;br /&gt;
 if (%c &amp;lt; 6) &amp;amp;&amp;amp; (%c !isalpha) ; ! negates the operator, this this returns true&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE&#039;&#039;&#039; this article covers only if-then-else &#039;&#039;&#039;string&#039;&#039;&#039; operators, so you can&#039;t use&lt;br /&gt;
 if (foo isin test.txt)&lt;br /&gt;
to check content of text-files. You can use [[$read]] instead to read the content of a text file and then use the return value returned by that $read.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Wildcard]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$asc&amp;diff=1324</id>
		<title>$asc</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$asc&amp;diff=1324"/>
		<updated>2005-11-29T21:02:13Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the ascii number of the character C.&lt;br /&gt;
 $asc(C)&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 echo -a $asc(A) ; returns &#039;&#039;65&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get the ascii value of a character, just type:&lt;br /&gt;
 //echo -a $asc([[$?]])&lt;br /&gt;
Type the character you want the ascii value of in the prompt and press enter.&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[$chr]] returns the character of an ascii number.&lt;br /&gt;
&lt;br /&gt;
[[Category:Text_and_Number_Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Timers&amp;diff=4377</id>
		<title>Timers</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Timers&amp;diff=4377"/>
		<updated>2005-11-27T23:15:47Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Shows or stops all active timers.&lt;br /&gt;
 /timers [off]&lt;br /&gt;
&lt;br /&gt;
Using /timers will show you all active timers, having the following format:&lt;br /&gt;
 * Active timers:&lt;br /&gt;
 * Timer &amp;lt;name&amp;gt; &amp;lt;seconds&amp;gt;s delay &amp;lt;commands to execute&amp;gt; (&amp;lt;network&amp;gt;)&lt;br /&gt;
 * Timer &amp;lt;name&amp;gt; &amp;lt;seconds&amp;gt;s delay &amp;lt;commands to execute&amp;gt; (&amp;lt;network&amp;gt;)&lt;br /&gt;
 -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you use /timers off, it will stop all active timers and echo: &#039;&#039;* All timers halted&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]][[Category:Timer Commands and Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$timer&amp;diff=4379</id>
		<title>$timer</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$timer&amp;diff=4379"/>
		<updated>2005-11-27T23:14:35Z</updated>

		<summary type="html">&lt;p&gt;Zyberdog: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns information about a timer.&lt;br /&gt;
 $timer(N/name)&lt;br /&gt;
&lt;br /&gt;
Returns the timer id of the Nth timer in the timers list or the one you have specified by its name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
$timer has the following properties:&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td width=&amp;quot;10%&amp;quot;&amp;gt;&amp;lt;b&amp;gt;property&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td width=&amp;quot;90%&amp;quot;&amp;gt;&amp;lt;b&amp;gt;explanation&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;com&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns the command&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;time&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns the time when the timer will be triggered (if you have specified one)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;reps&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns the repetitions the timer will have&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;delay&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns the delay between two triggers&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;type&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns online/offline status&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;secs&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns number of seconds left before timer is triggered&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;mmt&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns $true if timer is a multimedia timer&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;anysc&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns $true if the /timer -i switch was specified&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;wid&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns window id of the window it was issued in, if this is done remotly, it&#039;s the window id of the status window of the connection the timer is related to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;cid&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns connection id of the timer&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td valign=&amp;quot;top&amp;quot;&amp;gt;hwnd&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;returns the handle window of the window it was issued in, if this is done remotly, it&#039;s the hwnd of the status window of the connection the timer is related to&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
 [[alias]] timertest {&lt;br /&gt;
  [[timer]]foo 1 10 { [[echo]] -a moo }&lt;br /&gt;
  echo -a $timer(foo).com&lt;br /&gt;
  echo -a $timer(foo).delay&lt;br /&gt;
  [[if]] ($timer(foo).mmt) { echo -a timer foo is a multimedia timer }&lt;br /&gt;
  else { echo -a timer foo is no multimedia timer }&lt;br /&gt;
 }&lt;br /&gt;
This example will create an alias called timertest. The alias will at first make a new timer called &#039;&#039;foo&#039;&#039; and then echo some information about it. After ten seconds, you will get a &amp;quot;moo&amp;quot; in your active window, as the timer has been triggered then.&lt;br /&gt;
&lt;br /&gt;
[[Category:Timer Commands and Identifiers]]&lt;/div&gt;</summary>
		<author><name>Zyberdog</name></author>
	</entry>
</feed>