<?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=Saturn</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=Saturn"/>
	<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/Special:Contributions/Saturn"/>
	<updated>2026-05-14T13:16:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Cnick&amp;diff=6137</id>
		<title>Cnick</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Cnick&amp;diff=6137"/>
		<updated>2015-02-18T19:27:22Z</updated>

		<summary type="html">&lt;p&gt;Saturn: add meaning of highlight methods&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; /cnick -raniovpylNmNsN [nick[!user@host]] [color] [modes] [levels]&lt;br /&gt;
&lt;br /&gt;
This allows you to modify the items in the nick color list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Optional arguments&#039;&#039;&#039;&lt;br /&gt;
 [nick[!user@host]] nick/host of the user.&lt;br /&gt;
 [color]            the color you want to assign to the nick.&lt;br /&gt;
 [modes]            the list of modes required for that item to match, eg. @%+&lt;br /&gt;
 [levels]           makes mIRC search your [[:Category:Userlist|User List]] for a matching level and address.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Switches&#039;&#039;&#039;&lt;br /&gt;
 -r     removes the specified nick or address from the list.&lt;br /&gt;
 -a     sets the Any Mode option.&lt;br /&gt;
 -n     sets the No Mode option.&lt;br /&gt;
 -iovpy set the ignore, op, voice, protect, and notify list options respectively.&lt;br /&gt;
 -lN    sets the idle time.&lt;br /&gt;
 -mN    sets the highlight method, 0, 1, or 2 (corresponding to Message&amp;amp;Listbox, Message, and Listbox, respectively).&lt;br /&gt;
 -sN    sorts the item into the Nth position in the list.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&lt;br /&gt;
* You can use /cnick -r nick/N to remove first item that matches nick in the nick color list or the Nth item in the nick color list.&lt;br /&gt;
* To add or refer to an item as Any nick you can use the * character as the nick.&lt;br /&gt;
* [[cline|/cline]] over-rides the nick color list. You can use /cline -r to reset a nick to default color to make the nick color list apply to a nick.&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[$cnick]]&lt;br /&gt;
* [[Address book]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_do_I_reop_or_unban_myself&amp;diff=3831</id>
		<title>How do I reop or unban myself</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_do_I_reop_or_unban_myself&amp;diff=3831"/>
		<updated>2011-01-01T14:16:34Z</updated>

		<summary type="html">&lt;p&gt;Saturn: typo, thanks FIQ&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial will help you create a script that gives you some basic protection. Whenever someone deops you in your channel, it will automatically ask [[Q]] to reop you again. Also, when someone bans you, it will attempt to unban you again. Difficulty: easy&lt;br /&gt;
&lt;br /&gt;
First we&#039;ll look at how [[mIRC]] scripting actually handles these things. Whenever something happens (a message, a mode change, a kick and so on), your script can react to this. What you need are the so called [[:Category:remote|remote]] [[:Category:Events|events]]. You can read more about them by typing /help remote in a mIRC window. I suggest you do that right now.&lt;br /&gt;
&lt;br /&gt;
As you can see, the helpfile recommends you read through documents on [[:Category:Commands|Commands]], [[:Category:Aliases|Aliases]], [[:Category:Variables|Variables]] and [[:Category:Identifiers|Identifiers]]. Although it is always a good idea to do so, you might not fully understand what they do and how they work, so understanding all this is not required for this tutorial.&lt;br /&gt;
&lt;br /&gt;
Besides this, you&#039;ll see two other things in the help file. One is a list with events, the other is a note at the end: Note: You should never load or use a script that you don&#039;t understand. Whatever you do, keep this in mind! Lots of users have their Q accounts compromised and other data lost, just because they run a false script.&lt;br /&gt;
&lt;br /&gt;
Back to our problem. We want to get our ops back when someone removes it, so the event we need is the DeOp event. Click on it in the list. The [[On_op|on OP]] and [[On_deop|on DEOP]] events trigger when a user on a channel is opped or deopped. Sound like it&#039;s exactly what we need. Have a look at the format and the example below it:&lt;br /&gt;
&lt;br /&gt;
  Format: on &amp;lt;level&amp;gt;:OP:&amp;lt;#[,#]&amp;gt;:&amp;lt;commands&amp;gt;&lt;br /&gt;
  Example: on 1:OP:#mirc,#irchelp:/[[msg]] [[$nick]] Please don&#039;t abuse your Op status&lt;br /&gt;
&lt;br /&gt;
(on OP and on DEOP events work in a similar way.)&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;1&#039;&#039; in the example is a [[Access Levels|userlevel]]. Userlevel 1 means the event always triggers, no matter what level the deop&#039;ing user has, as mIRC per default assigns all users with level 1. The &#039;&#039;#mirc,#irchelp&#039;&#039; are obvioulsy channels the event should work for. Finally, the &#039;&#039;/msg $nick Please don&#039;t...&#039;&#039; part is the command that should be executed. &#039;&#039;$nick&#039;&#039; is an identifier. It returns something. If fishbot would have done the op, then mIRC would read the line as /msg fishbot Please don&#039;t... In words:&lt;br /&gt;
&lt;br /&gt;
If someone with level 1 or higher (everyone) ops someone in #mirc or #irchelp, message him with Please don&#039;t abuse your Op status.&lt;br /&gt;
&lt;br /&gt;
To use such an event, you&#039;ll need to paste it in [[:Category:Remote|Remote]]. Go to Tools -&amp;gt; Script editor or hit Alt + R. Should the field not be empty, then go to File and select New. If you&#039;d want to use this event, you&#039;d paste it in the large text field and press OK. For now, just press OK without pasting.&lt;br /&gt;
&lt;br /&gt;
Let&#039;s say your channel is #mychannel. As we want this event to work for all userlevels too, we can make the biggest part of the event: on 1:DEOP:#mychannel:/command. The event can trigger more commands too. We&#039;re gonna change the format for that a bit:&lt;br /&gt;
 on 1:DEOP:#mychannel:{&lt;br /&gt;
   command1&lt;br /&gt;
   command2&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
You might have seen the { } format before. Inside those, we can list as many commands as we want. Let&#039;s say your channel has [[Q]]. One of the commands we need would be: &#039;&#039;msg Q op #mychan&#039;&#039;. Instead of #mychan, we can use another identifier. [[$chan]] returns the channel all this happens on, so let&#039;s change the command to &#039;&#039;msg Q op $chan&#039;&#039;. This way you can use the same command for more than 1 channel.&lt;br /&gt;
&lt;br /&gt;
Now we have another problem. If we&#039;d use on 1:DEOP:#mychan:{ msg Q op $chan }, it would send the message if someone else gets deopped too. That&#039;s why we&#039;re gonna limit it using an [[If-Then-Else|if-statement]]. The if-statement basically checks something. If what it checks is true, it executes some commands. If not, it either does nothing or goes to an else part. For now we won&#039;t use else parts.&lt;br /&gt;
&lt;br /&gt;
What we wanted to check was if it was you who got deopped. As the help on the [[On_op|op]]/[[On_deop|deop]] event says, [[$opnick]] returns the person/nick who get&#039;s opped/deopped in those events. We&#039;ll need to use another identifier: $me. $me simply returns your own nickname. The if-statement we need would become &#039;&#039;if ($opnick == $me) { commands }&#039;&#039;. The == is an operator meaning &#039;equal to&#039; and that&#039;s exactly what we want: &amp;quot;if (the person who gets deopped is equal to myself)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Now, let&#039;s just put the if statement we just made inside the event:&lt;br /&gt;
&lt;br /&gt;
 on 1:DEOP:#mychannel:{&lt;br /&gt;
   if ($opnick == $me) {&lt;br /&gt;
     msg Q op $chan&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This will do what we need. If you get deopped on your channel, it will ask Q to reop you. Have a look at the spaces in front of some of the lines. mIRC automatically adds them when you click OK or the { } button in the remote dialog. The { } button is really useful, because it lets mIRC check if you have placed the { and } brackets correctly. When you&#039;ll write bigger scripts, you&#039;ll start using it a lot.&lt;br /&gt;
&lt;br /&gt;
We&#039;ll now create another event. We want it to unban you whenever you get banned on your channel. Let&#039;s start with having a look at what actually happens. When someone bans, he sets a banmask, for example *!milk@*.cows.net. This mask contains wildcards, which means it bans dynamically. A wildcard, *, can be replaced by anything: bill!milk@white.cows.net will for example be banned.&lt;br /&gt;
&lt;br /&gt;
With help from the helpfile, we can easily create the following event:&lt;br /&gt;
&lt;br /&gt;
 [[On_ban|on @1:BAN]]:#mychannel:{&lt;br /&gt;
   if ([[$bnick]] == $me) {&lt;br /&gt;
     mode $chan -b [[$banmask]]&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Click the parts above you don&#039;t understand to see more information on them.&lt;br /&gt;
&lt;br /&gt;
This event will work in some cases, but unfortunately by far not in all. &#039;&#039;$bnick&#039;&#039; only works when a nick is specified inside the banmask, like: &#039;&#039;nick!*@*.*&#039;&#039;. There is another possibility though.&lt;br /&gt;
&lt;br /&gt;
If we want your full address, we can use [[$address]]($me,5) or [[$ial]]([[$me]]). (Again, click the identifiers mentioned for more detailed information on what they can do.)&lt;br /&gt;
&lt;br /&gt;
We only used the == operator in if-statements until now. Now have a look at the [[If-Then-Else#The_Operators|iswm]] operator. It literally means is wildcard match. &#039;&#039;if (a*c iswm abc)&#039;&#039; would be true, &#039;&#039;if (ac* iswm abc)&#039;&#039; wouldn&#039;t.&lt;br /&gt;
&lt;br /&gt;
Now, we can use this to check if the banmask matches your address; to check if &#039;you are banned&#039;:&lt;br /&gt;
&lt;br /&gt;
 on @1:BAN:#mychannel:{&lt;br /&gt;
   if ($banmask iswm $ial($me)) {&lt;br /&gt;
     mode $chan -b $banmask&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
That will do the trick.&lt;br /&gt;
&lt;br /&gt;
When you fully understand how these events work, you should also be able to create events that do these things:&lt;br /&gt;
&lt;br /&gt;
- [[Kick]] someone who deops your friend&lt;br /&gt;
- Only allow people with [[Access Levels|level]] 20 or higher to [[ban]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;br /&gt;
{{Author|Voronoi}}&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Nick&amp;diff=4190</id>
		<title>Nick</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Nick&amp;diff=4190"/>
		<updated>2010-02-21T21:17:49Z</updated>

		<summary type="html">&lt;p&gt;Saturn: fix nick match regex&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Changes your nickname.&lt;br /&gt;
&lt;br /&gt;
 /nick new-nick&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
*Valid nickname characters are as follows: 0-9a-z\[]^_`{|}-&lt;br /&gt;
*A nickname must also &#039;&#039;&#039;not&#039;&#039;&#039; begin with a numeric or a hyphen (-). &lt;br /&gt;
*Some ircd reserve single character nicknames for service bots, QuakeNet &#039;&#039;&#039;is&#039;&#039;&#039; an example of this.&lt;br /&gt;
&#039;&#039;Here is an example to check if %nick is a valid nickname or not:&#039;&#039;&lt;br /&gt;
 [[var]] %nick = /V/alid&lt;br /&gt;
 var %regex = /^([][A-Za-z_\\^`{|}][][\w\\^`{|}-]*)/&lt;br /&gt;
 [[If-Then-Else|if]] ([[$regex]](%nick,%regex)) {&lt;br /&gt;
   [[echo]] -ag [[$regml]](1) is a valid nickname!&lt;br /&gt;
 }&lt;br /&gt;
 [[If-then-else|else]] { echo -ag %nick is not a valid nickname! }&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The above example, if you feed it with  &#039;&#039;\Valid!nvalid&#039;&#039;, it would return it as a valid nickname, although the only valid part of the nick is &#039;&#039;\Valid&#039;&#039;.  If you type /nick \Valid!nvalid the ircd would trim the nick to \Valid, this is why in the echo of a valid nickname we use $regml(1) instead of %nick, this is a back reference to the valid nickname captured.&lt;br /&gt;
&lt;br /&gt;
If you also want to check that the nickname is atleast two characters long you can replace the * with a + as it will make sure that the second exists:&lt;br /&gt;
 /^([][A-Za-z_\\^`{|}][][\w\\^`{|}-]+)/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example below will only match if the whole nickname is valid, so it won&#039;t truncate the nickname:&lt;br /&gt;
 /^([][A-Za-z_\\^`{|}][][\w\\^`{|}-]*)$/&lt;br /&gt;
== See Also ==&lt;br /&gt;
* {{Relatedraws|nick}}&lt;br /&gt;
* [[On nick|On nick event]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic IRC commands]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_query_a_CS_Server&amp;diff=2784</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=2784"/>
		<updated>2009-04-16T18:18:05Z</updated>

		<summary type="html">&lt;p&gt;Saturn: update to protocol 48, thanks to NaNg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you want to e.g. get the number 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 or http://developer.valvesoftware.com/wiki/Server_Queries .&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 (completely) to be able to use it.&lt;br /&gt;
&lt;br /&gt;
 ; HL server query snippet by Saturn&lt;br /&gt;
 ;&lt;br /&gt;
 ; 16-04-2009: update to protocol version 48 by NaNg&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;
   ; construct the query to send to the server&lt;br /&gt;
   [[bset]] -t &amp;amp;t 1 [[$str]]([[$chr]](255),4) [[DollarPlus|$+]] TSource Engine Query&lt;br /&gt;
   [[bset]] &amp;amp;t 25 0&lt;br /&gt;
   ; actually open the socket, and send the query&lt;br /&gt;
   [[sockudp]] -k %sock [[$1-|$1]]-2 &amp;amp;t&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 sent 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 queried 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;
     ; save 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;
 &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 off the timer closing the socket&lt;br /&gt;
   .timer $+ $sockname off&lt;br /&gt;
   ; as we can close it now manually&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, and ask for a player challenge number&lt;br /&gt;
   sockudp -k %sock $1-2 $str($chr(255),4) $+ U $+ $str($chr(255),4)&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 on the timer closing the socket after 60seconds&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 our 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 it 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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=4216</id>
		<title>User:Saturn</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=4216"/>
		<updated>2009-04-03T13:54:05Z</updated>

		<summary type="html">&lt;p&gt;Saturn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Babel-2|nl|en-3}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[Image:Saturn.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&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 van Moolenbroek&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;(unspecified)&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;Country&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The Netherlands&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;The eyes of truth are always watching you.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[[Category:Members]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Limits&amp;diff=2608</id>
		<title>Limits</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Limits&amp;diff=2608"/>
		<updated>2008-08-27T18:42:51Z</updated>

		<summary type="html">&lt;p&gt;Saturn: update for channel keys limit&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;font color=#FF0000&amp;gt;&#039;&#039;&#039;Warning: These values may be outdated for mIRC v6.32. Updated and confirmed sections are marked with &amp;lt;/font&amp;gt;&amp;lt;font color=#00AA00&amp;gt;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This page explains various limits imposed by mIRC, however this may not be a complete list. The length is measured in bytes (equivalent to ASCII characters, including spaces.)&lt;br /&gt;
&lt;br /&gt;
You can find the original limits page [http://www.xise.nl/mirc/wiki/doku.php?id=limits here.]&lt;br /&gt;
&lt;br /&gt;
= mIRC =&lt;br /&gt;
&amp;lt;table border=2 rules=all cellpadding=4 style=text-align:center&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Name&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&#039;&#039;&#039;Length&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&#039;&#039;&#039;When exceeded&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&#039;&#039;&#039;Description&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;Global limits &amp;lt;font color=#00AA00&amp;gt;(Updated)&amp;lt;/font&amp;gt;&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Line Length Limit&#039;&#039;&#039;&amp;lt;br&amp;gt;(&#039;&#039;LLL&#039;&#039;)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4150&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated or error&amp;lt;td style=text-align:left&amp;gt;To be precise: 4150 for evaluation results, 4151 for command lines (excluding command prefixes.)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Variables&#039;&#039;&#039;&amp;lt;br&amp;gt;(local or global)&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4150&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Unset&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;This limit includes the variable&#039;s name. Example: using &amp;quot;%a&amp;quot; as a name uses 3 bytes (2 for the name and 1 for a space.)&amp;lt;br&amp;gt;This means that for every extra character in the variable name, the maximum length of the value is reduced.&amp;lt;br&amp;gt;&#039;&#039;&#039;Note:&#039;&#039;&#039; the /set command further reduces the length limit to 9144 due to the 4 characters used by &amp;quot;set &amp;quot;. (LLL)&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;IRC server specific&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Incoming lines&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;601&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;Excludes CR/LF.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Outgoing lines&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LLL&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;font color=#00AA00&amp;gt;&#039;&#039;&#039;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Joined channel names&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Parted immediately&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;font color=#00AA00&amp;gt;&#039;&#039;&#039;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt; Includes channel prefix.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Channel keys&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;font color=#00AA00&amp;gt;&#039;&#039;&#039;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Addresses&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;90&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;The part of the full address after the &amp;quot;!&amp;quot;; only with JOIN/QUIT messages, addresses from WHO replies are not truncated.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Nicknames&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Server passwords&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;50&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;As associated with server entries&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;CTCPs&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Incoming PING argument&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;24&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;No reply sent&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;First character must be a digit; leading spaces ignored.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;Sockets&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Socket name&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;255&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Error&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;font color=#00AA00&amp;gt;&#039;&#039;&#039;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Send buffer&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;16384&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Error&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;mIRC&#039;s own buffers, not WinSock&#039;s.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Receive buffer&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4096&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Receipt stalls&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;mIRC&#039;s own buffers, not WinSock&#039;s.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Socket mark&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;LLL&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;font color=#00AA00&amp;gt;&#039;&#039;&#039;(Updated)&#039;&#039;&#039;&amp;lt;/font&amp;gt; Not 512 as the helpfile says.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;Hashtables &amp;lt;font color=#00AA00&amp;gt;(Updated)&amp;lt;/font&amp;gt;&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Hashtable name&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Hashtable size&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;10000&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Error&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;In number of buckets&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;GUI &amp;lt;font color=#00AA00&amp;gt;(Updated)&amp;lt;/font&amp;gt;&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Editbox&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1024&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Sent&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;Editbox is cleared afterwards, similar to pressing Enter.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;Dialogs &amp;lt;font color=#00AA00&amp;gt;(Updated)&amp;lt;/font&amp;gt;&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Dialog name&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;256&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Input dialog text field&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;1023&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Truncated&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan=0&amp;gt;&#039;&#039;&#039;Files &amp;lt;font color=#00AA00&amp;gt;(Updated)&amp;lt;/font&amp;gt;&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&#039;&#039;&#039;Line of text&#039;&#039;&#039;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;4149&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Split&amp;lt;/td&amp;gt;&amp;lt;td style=text-align:left&amp;gt;Excluding CR/LF. Applies to all file-related commands/identifiers.&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Clear-Chanlev_Script_for_QuakeNet&amp;diff=2462</id>
		<title>Clear-Chanlev Script for QuakeNet</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Clear-Chanlev_Script_for_QuakeNet&amp;diff=2462"/>
		<updated>2008-04-12T12:15:57Z</updated>

		<summary type="html">&lt;p&gt;Saturn: fix for &amp;quot;No channel specified&amp;quot; error&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; ; ClearChanlev script by doomie&lt;br /&gt;
 ;   #help.script @ QuakeNet&lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ; You can use this script by typing:&lt;br /&gt;
 ;&lt;br /&gt;
 ;        /clearchanlev [-c|-r] #channel&lt;br /&gt;
 ; &lt;br /&gt;
 ;   Note, that you must be authed and owner of #channel. &lt;br /&gt;
 ;&lt;br /&gt;
 ;   Flags:&lt;br /&gt;
 ;           * -r ... Resets the script, i.e. cleans everything up. One usually doesn&#039;t need that flag, however, if something didn&#039;t work,&lt;br /&gt;
 ;                    one can use it.  &lt;br /&gt;
 ;           * -c ... If you use this flag, the script will remove you from the channel aswell. This means, that Q will leave the channel&lt;br /&gt;
 ;                    completly. Note that you can _NOT_ reverse it!&lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ;   Example output:&lt;br /&gt;
 ;&lt;br /&gt;
 ;      ClearChanlev: -----------------------------&lt;br /&gt;
 ;      ClearChanlev: Now beginning to remove all chanlevs from channel #channel except yours!&lt;br /&gt;
 ;      ClearChanlev: Receiving own auth now!&lt;br /&gt;
 ;      ClearChanlev: ...done.&lt;br /&gt;
 ;      ClearChanlev: Saving chanlev now...&lt;br /&gt;
 ;      ClearChanlev: ...done.&lt;br /&gt;
 ;      ClearChanlev: There are 2 lines to send. This will take approximatly 4 seconds. Removing...&lt;br /&gt;
 ;      ClearChanlev: ...done.&lt;br /&gt;
 ;      ClearChanlev: Cleaned up!&lt;br /&gt;
 ;      ClearChanlev: -----------------------------&lt;br /&gt;
 ;&lt;br /&gt;
 &lt;br /&gt;
 ; Returns the milliseconds between every message sent to Q&lt;br /&gt;
 ; If you excess flood, you should increase this value to 4000 or even 5000.&lt;br /&gt;
 [[alias]] -l ClearChanlev.Delay { [[return]] 3000 } &lt;br /&gt;
 &lt;br /&gt;
 ; $1 = #channel&lt;br /&gt;
 ;&lt;br /&gt;
 ; flags:&lt;br /&gt;
 ;   -c --complete = deletes the complete chanlev, inclusive owner. This will&lt;br /&gt;
 ;                   result in Q parting.&lt;br /&gt;
 ;   -r --reset    = resets the scripts in case something didn&#039;t work the last time.&lt;br /&gt;
 alias ClearChanlev {&lt;br /&gt;
   [[echo]] -s ClearChanlev: -----------------------------&lt;br /&gt;
   [[var]] %i = 1, %c, %ClearChanlev.Complete = 0, %r, %ClearChanlev.Force = 0, %ClearChanlev.Channel&lt;br /&gt;
   [[While loops|while]] (%i [[If#.3C.3D|&amp;lt;=]] [[$0]]) {&lt;br /&gt;
     %c = $ [[Evaluation_brackets|[]] [[DollarPlus|$+]] [[Evaluation_brackets|[]] %i [[Evaluation_brackets|] ]]]&lt;br /&gt;
     [[if]] (%c [[If#.3D.3D|==]] -c) [[If#Combining_comparisons|||]] (%c == --complete) {&lt;br /&gt;
       %ClearChanlev.Complete = 1&lt;br /&gt;
     }&lt;br /&gt;
     elseif (%c == -r) || (%c == --reset) {&lt;br /&gt;
       %ClearChanlev.Force = 1&lt;br /&gt;
     }&lt;br /&gt;
     elseif ([[$left]](%c, 1) == [[$chr]](35)) {&lt;br /&gt;
       %ClearChanlev.Channel = %c&lt;br /&gt;
     }&lt;br /&gt;
     [[inc]] %i&lt;br /&gt;
   }&lt;br /&gt;
   if (%ClearChanlev.Global) {&lt;br /&gt;
     if (%ClearChanlev.Force == 0) {&lt;br /&gt;
       echo -s ClearChanlev: ClearChanlev is currently running. If this is not the case, please use the -r flag (i.e. /clearchanlev -r #channel)&lt;br /&gt;
       echo -s ClearChanlev: -----------------------------&lt;br /&gt;
       return&lt;br /&gt;
     }&lt;br /&gt;
     else {&lt;br /&gt;
       [[unset]] %ClearChanlev.Global&lt;br /&gt;
       echo -s ClearChanlev: ClearChanlev reseted.&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
   if (!%ClearChanlev.Channel) {&lt;br /&gt;
     echo -s ClearChanlev: No channel specified.&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   %r = [[$rand]](1,1000)&lt;br /&gt;
   [[set]] %ClearChanlev.Global %ClearChanlev.Channel %ClearChanlev.Complete %r&lt;br /&gt;
   echo -s ClearChanlev: Now beginning to remove all chanlevs from channel %ClearChanlev.Channel [[$iif]](%ClearChanlev.Complete, inclusive, except) yours!&lt;br /&gt;
   echo -s ClearChanlev: Receiving own auth now!&lt;br /&gt;
   .[[timer]]ClearChanlevCleanUp 1 60 ClearChanlev.CleanUp&lt;br /&gt;
   .[[who]] [[$me]] n%nat, $+ %r&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[:Category:Raws|raw]] [[Raw_354|354]]:*: {&lt;br /&gt;
   if ([[$1-|$2]] == [[$gettok]](%ClearChanlev.Global, 3, 32)) &amp;amp;&amp;amp; ($3 == $me) {&lt;br /&gt;
     haltdef&lt;br /&gt;
     set %ClearChanlev.Global %ClearChanlev.Global $4&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 raw [[Raw_315|315]]:*: {&lt;br /&gt;
   if (%ClearChanlev.Global) &amp;amp;&amp;amp; ($2 == $me) {&lt;br /&gt;
     [[haltdef]]&lt;br /&gt;
     if ($gettok(%ClearChanlev.Global, 4, 32) == 0) {&lt;br /&gt;
       echo -s ClearChanlev: You are NOT authed.&lt;br /&gt;
       ClearChanlev.CleanUp&lt;br /&gt;
     } &lt;br /&gt;
     else {&lt;br /&gt;
       echo -s ClearChanlev: ...done.&lt;br /&gt;
       set %ClearChanlev.Global %ClearChanlev.Global 0&lt;br /&gt;
       .[[msg]] Q chanlev $gettok(%ClearChanlev.Global, 1, 32)&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 alias -l ClearChanlev.GotMessages {&lt;br /&gt;
   if (![[$exists]](ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt)) {&lt;br /&gt;
     echo -s ClearChanlev: File does not exist!&lt;br /&gt;
     ClearChanlev.CleanUp&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if ([[$lines]](ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt) == 0) {&lt;br /&gt;
     echo -s ClearChanlev: No chanlev to remove!&lt;br /&gt;
     ClearChanlev.CleanUp&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   if ($gettok(%ClearChanlev.Global, 5, 32) == 0) {&lt;br /&gt;
     echo -s ClearChanlev: You are NOT owner of this channel. Aborting!&lt;br /&gt;
     ClearChanlev.CleanUp&lt;br /&gt;
     return&lt;br /&gt;
   }&lt;br /&gt;
   echo -s ClearChanlev: There are $lines(ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt) lines to send. This will take [[$&amp;amp;]]&lt;br /&gt;
     approximatly $calc($lines(ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt) * $ClearChanlev.Delay / 1000) seconds. Removing... &lt;br /&gt;
   .[[play]] Q ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt $ClearChanlev.Delay&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 alias -l ClearChanlev.CleanUp {&lt;br /&gt;
   .[[remove]] ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt&lt;br /&gt;
   unset %ClearChanlev.*&lt;br /&gt;
   .timerClearChanlevCleanUp off&lt;br /&gt;
   echo -s ClearChanlev: Cleaned up!&lt;br /&gt;
   echo -s ClearChanlev: -----------------------------&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; $1- = message from Q&lt;br /&gt;
 alias -l ClearChanlev.Interpret {&lt;br /&gt;
   if (%ClearChanlev.Global) {&lt;br /&gt;
     if (Username*Flags*Last join*Last changed iswm $1-) {&lt;br /&gt;
       echo -s ClearChanlev: Saving chanlev now...&lt;br /&gt;
       set %ClearChanlev.Global %ClearChanlev.Global 1&lt;br /&gt;
     }&lt;br /&gt;
     elseif (You do not have sufficient access on* iswm $1-) {&lt;br /&gt;
       echo -s ClearChanlev: You do not have sufficied access on the specified channel!&lt;br /&gt;
       ClearChanlev.CleanUp&lt;br /&gt;
     }&lt;br /&gt;
     elseif (End of list. == $1-) { &lt;br /&gt;
       echo -s ClearChanlev: ...done.&lt;br /&gt;
       set %ClearChanlev.Global [[$puttok]](%ClearChanlev.Global, 0, 6, 32)&lt;br /&gt;
       if ([[$numtok]](%ClearChanLev.Users,32)) {&lt;br /&gt;
         [[write]] ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt REMOVEUSER $gettok(%ClearChanlev.Global, 1, 32) %ClearChanLev.Users&lt;br /&gt;
         unset %ClearChanlev.Users&lt;br /&gt;
       }&lt;br /&gt;
       ClearChanlev.GotMessages&lt;br /&gt;
     }&lt;br /&gt;
     elseif (Channel * is unknown or suspended. iswm $1-) {&lt;br /&gt;
       echo -s ClearChanlev: Channel is not known or suspended. Aborting.&lt;br /&gt;
       ClearChanlev.CleanUp&lt;br /&gt;
     }&lt;br /&gt;
     elseif ($gettok(%ClearChanlev.Global, 6, 32) == 1) {&lt;br /&gt;
       if ($1 == $gettok(%ClearChanlev.Global, 4, 32)) {&lt;br /&gt;
         if (n !isin $2) {&lt;br /&gt;
           set %ClearChanlev.Global $puttok(%ClearChanlev.Global, 0, 5, 32)&lt;br /&gt;
           return&lt;br /&gt;
         }&lt;br /&gt;
         else {&lt;br /&gt;
           set %ClearChanlev.Global $puttok(%ClearChanlev.Global, 1, 5, 32)&lt;br /&gt;
         }&lt;br /&gt;
 &lt;br /&gt;
         if ($gettok(%ClearChanlev.Global, 2, 32) == 0) {&lt;br /&gt;
           return&lt;br /&gt;
         }&lt;br /&gt;
         else {&lt;br /&gt;
           write ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt CHANLEV $gettok(%ClearChanlev.Global, 1, 32) $chr(35) $+ $1 [[$replace]]($2,+,-)&lt;br /&gt;
           return&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
       else {&lt;br /&gt;
         if (n isin $2) {&lt;br /&gt;
           write ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt CHANLEV $gettok(%ClearChanlev.Global, 1, 32) $chr(35) $+ $1 $replace($2,+,-)&lt;br /&gt;
         }&lt;br /&gt;
         else {&lt;br /&gt;
           set %ClearChanlev.Users $addtok(%ClearChanLev.users,$chr(35) $+ $1,32)&lt;br /&gt;
           if ($numtok(%ClearChanlev.Users,32) == 18) {&lt;br /&gt;
             write ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt REMOVEUSER $gettok(%ClearChanlev.Global, 1, 32) %ClearChanlev.Users&lt;br /&gt;
             unset %ClearChanlev.Users&lt;br /&gt;
           }&lt;br /&gt;
         }&lt;br /&gt;
       }&lt;br /&gt;
     }&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on ^*:[[On_notice|Notice]]:*:?: {&lt;br /&gt;
   if ([[$nick]] == Q) &amp;amp;&amp;amp; (%ClearChanlev.Global) {&lt;br /&gt;
     haltdef&lt;br /&gt;
     ClearChanlev.Interpret $1-&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on ^*:[[On_text|Text]]:*:?: {&lt;br /&gt;
   if ($nick == Q) &amp;amp;&amp;amp; (%ClearChanlev.Global) {&lt;br /&gt;
     haltdef&lt;br /&gt;
     ClearChanlev.Interpret $1-&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 on *:[[On_playend|PLAYEND]]:{&lt;br /&gt;
   if ([[$nopath]]([[$filename]]) == ClearChanlev $+ $gettok(%ClearChanlev.Global, 3, 32) $+ .txt) {&lt;br /&gt;
     echo -s ClearChanlev: ...done.&lt;br /&gt;
     ClearChanlev.Cleanup&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
[[Category:Script Archive]]&lt;br /&gt;
{{Author|Doomie}}&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_make_a_VIP_script&amp;diff=1950</id>
		<title>How to make a VIP script</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_make_a_VIP_script&amp;diff=1950"/>
		<updated>2007-06-12T16:51:15Z</updated>

		<summary type="html">&lt;p&gt;Saturn: grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to check if a user is opped on some channel where you/your bot isn&#039;t.&lt;br /&gt;
We&#039;ll be using vipchannels.txt to store the VIP channels we want to check, each channel on their own line, ie:&lt;br /&gt;
 #myvipchannel&lt;br /&gt;
 #somechannel&lt;br /&gt;
 #help.script&lt;br /&gt;
&lt;br /&gt;
On to the script:&lt;br /&gt;
&lt;br /&gt;
 on !*:join:#YOURCHAN:{&lt;br /&gt;
   ; We&#039;ll set a temporary global variable to indicate that we&#039;re checking the VIP, so we can halt the default /whois text from showing up&lt;br /&gt;
   ; Then we&#039;ll do whois on the nick. Note the &amp;quot;!&amp;quot; in the join event: it prevents the script from triggering, if it is you who joined&lt;br /&gt;
   set %vipcheck 1&lt;br /&gt;
   whois $nick&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 raw 319:*:{&lt;br /&gt;
   ; Channels list&lt;br /&gt;
   ; In this raw we loop through the txt-file vipchannels.txt and see if the user is opped on any of these channels&lt;br /&gt;
   ; This will only be done when the %vipcheck is set&lt;br /&gt;
   if (%vipcheck) { &lt;br /&gt;
     var %x = 1 &lt;br /&gt;
     while ($read(vipchannels.txt,%x)) { &lt;br /&gt;
       ; put the channel name into a variable %c&lt;br /&gt;
       var %c = $v1&lt;br /&gt;
 &lt;br /&gt;
       ; see if $+(@,%c) (equals: @ $+ #somevipchannel) is found from the users channels&lt;br /&gt;
       if ($istok($3-,$+(@,%c),32)) { &lt;br /&gt;
 &lt;br /&gt;
         ; @#somevipchannel was found, so the user is opped on this channel, we tell the user that he&#039;s a vip, and set mode +o for him on another chan (note that $2 is the users nick here)&lt;br /&gt;
         msg $2 you are opped on %c $+ , and that makes you a VIP.&lt;br /&gt;
         mode #YOURCHAN +o $2&lt;br /&gt;
         break &lt;br /&gt;
       } &lt;br /&gt;
       inc %x &lt;br /&gt;
     }&lt;br /&gt;
 &lt;br /&gt;
     ; haltdef so that you don&#039;t see the channels everytime someone joins&lt;br /&gt;
     haltdef &lt;br /&gt;
   } &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 raw 318:*:{ &lt;br /&gt;
   ; end of /whois&lt;br /&gt;
   ; here we just unset the temporary variable %vipcheck, so we can use normal /whois again&lt;br /&gt;
   if (%vipcheck) { unset %vipcheck | haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ;;; Halting other /whois information from showing up&lt;br /&gt;
 raw 301:*:{ &lt;br /&gt;
   ; away&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 raw 311:*:{ &lt;br /&gt;
   ; user&#039;s ident, host and realname&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 raw 312:*:{ &lt;br /&gt;
   ; server information&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 raw 313:*:{ &lt;br /&gt;
   ; if the user is IRCop&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 raw 317:*:{ &lt;br /&gt;
   ; signon and idle time&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;br /&gt;
 raw 330:*:{ &lt;br /&gt;
   ; users auth&lt;br /&gt;
   if (%vipcheck) { haltdef } &lt;br /&gt;
 }&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=How_to_start&amp;diff=1546</id>
		<title>How to start</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=How_to_start&amp;diff=1546"/>
		<updated>2006-09-10T22:28:55Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* Aliases-Tab */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This tutorial is supposed to give an introduction into scripting in mIRC. It will explain the so-called &#039;&#039;Scripts-Editor&#039;&#039; and it&#039;s functions, followed by a little example. At the end it will give some hints about how to debug a script.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Remote Editor ==&lt;br /&gt;
&lt;br /&gt;
If you want to begin to script in mIRC, you need to open the Script-Editor. You can do it in two ways: pressing &amp;quot;Alt + R&amp;quot; or with mIRC&#039;s menubar (Tools -&amp;gt; Scripts Editor).&lt;br /&gt;
&lt;br /&gt;
If you are using a premade script (for example nnscript), you will probably see a lot of code. Note that it is difficult to implement own scripts in such a premade one, as functions could interfere (if you want to change mIRC&#039;s default output for example). &lt;br /&gt;
&lt;br /&gt;
At first, you should open a &#039;&#039;&#039;new remote file&#039;&#039;&#039;. To do it, click on File -&amp;gt; New (see picture below).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Newfile.png]]&lt;br /&gt;
&lt;br /&gt;
Note that your script files will be saved &#039;&#039;&#039;automatically&#039;&#039;&#039;; all you need to do is pressing &#039;Ok&#039;.&lt;br /&gt;
&lt;br /&gt;
The next part is about the five different tabs of mIRC&#039;s Scripts Editor:&lt;br /&gt;
&lt;br /&gt;
[[Image:scriptseditortabs.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Aliases-Tab === &lt;br /&gt;
&lt;br /&gt;
Basically, you do not need to use aliases.ini (that you can edit using this tab). Usually, if you want to add a new alias, it would look like:&lt;br /&gt;
&lt;br /&gt;
 [[alias]] moo { [[return]] moo }&lt;br /&gt;
&lt;br /&gt;
in your &#039;Remote-Section&#039; of the editor (the one that&#039;s active after pressing Alt + R).&lt;br /&gt;
&lt;br /&gt;
You can add the same alias in your Aliases-Section:&lt;br /&gt;
&lt;br /&gt;
 moo { return moo }&lt;br /&gt;
&lt;br /&gt;
Notice that you don&#039;t need to write &#039;alias&#039; infront of the new alias. Note that you cannot add events in this section.&lt;br /&gt;
&lt;br /&gt;
=== Popups-Tab ===&lt;br /&gt;
&lt;br /&gt;
Again you do not need to use this section. It&#039;s the same as using the [[menu]] alias in the remote section. Usually, there will be some menus added in this section (for example your nicklist-menu).&lt;br /&gt;
&lt;br /&gt;
[[Image:Popupsview.png]]&lt;br /&gt;
&lt;br /&gt;
=== Remote-Tab ===&lt;br /&gt;
&lt;br /&gt;
This is the &amp;quot;maintab&amp;quot;. Every script is supposed to be saved in here.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you should not have two same events in one file, as only the first matching one will be triggered. Example:&lt;br /&gt;
&lt;br /&gt;
 ; will be triggered&lt;br /&gt;
 on *:Text:*:*: { echo moo }&lt;br /&gt;
 &lt;br /&gt;
 ; will never be triggered&lt;br /&gt;
 on 10:Text:*:*: { echo maa }&lt;br /&gt;
&lt;br /&gt;
 ; will be trigger for level 10&lt;br /&gt;
 on 10:Text:*:*: { echo maa }&lt;br /&gt;
 &lt;br /&gt;
 ; will be triggered for all but level 10&lt;br /&gt;
 on *:Text:*:*: { echo moo }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if you aren&#039;t sure whether it will work or not, just use another (a new) file (look above to see how to make a new file). &lt;br /&gt;
&lt;br /&gt;
The following script will trigger on every &amp;quot;!moo&amp;quot; in every channel and response with &amp;quot;moo00oo00&amp;quot;:&lt;br /&gt;
 &lt;br /&gt;
 [[On_text|on *:TEXT]]:!moo:#: {&lt;br /&gt;
  [[msg]] [[$chan]] moo00oo00&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This would look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Firstscript.png]]&lt;br /&gt;
&lt;br /&gt;
If you are scripting something more complex, you want to use the &amp;quot;{}&amp;quot;-button in the upper right corner (see below).&lt;br /&gt;
&lt;br /&gt;
[[Image:Bracket-button.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you&#039;ve pressed it and nothing happended, everything is ok (note that it doesn&#039;t mean that your scripts will work, just that there is no obvious bracket mistake (mIRC just counts the open and closed brackets)). If something&#039;s wrong, you will get the following popup:&lt;br /&gt;
&lt;br /&gt;
[[Image:Bracketerror.png]]&lt;br /&gt;
&lt;br /&gt;
=== Users-Tab ===&lt;br /&gt;
&lt;br /&gt;
In this file your userlist is saved. You don&#039;t need to edit it manually, as there are aliases to do so. See [[auser]], [[guser]] and [[ruser]].&lt;br /&gt;
&lt;br /&gt;
=== Variables-Tab ===&lt;br /&gt;
&lt;br /&gt;
All your global variables are saved in here. Again, you don&#039;t need to edit it manually, as you can use [[set]], [[unset]] or [[unsetall]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to debug ==&lt;br /&gt;
&lt;br /&gt;
After you&#039;ve written some lines and you&#039;ve tested it, you will most likely notice, that it doesn&#039;t do what you expect it to do. The next step is to &#039;&#039;&#039;debug&#039;&#039;&#039; your script. At first take a look at your Status Window and check for error messages. If there are any, search for these errors in your script and correct them. If they aren&#039;t any, you should add [[echo]]&#039;s in your script to see where it stops to work. For example:&lt;br /&gt;
&lt;br /&gt;
 on *:TEXT:*:*: {&lt;br /&gt;
  if (%moo) { echo -a we are here }&lt;br /&gt;
  elseif (%moo2) { echo -a we are here 2 } &lt;br /&gt;
  echo -a after the if clauses&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
With this method, you can exactly see where it stops to work and correct this part.&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; You cannot trigger on text, on notice, on action... events by yourself, for that you will need someones help or another client or multiserver (/server -m ...) to test them.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=IAL-Update&amp;diff=4336</id>
		<title>IAL-Update</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=IAL-Update&amp;diff=4336"/>
		<updated>2006-08-21T17:26:27Z</updated>

		<summary type="html">&lt;p&gt;Saturn: scon -at1, not scon -am1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To have your [[:Category:IAL|IAL]] always up-to-date, you can use the following script (you can find more detailed explanations in the script).&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; IAL-UPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ;info:&lt;br /&gt;
 ;&lt;br /&gt;
 ;  by wiebe @ QuakeNet&lt;br /&gt;
 ;  version 1.0  (written and tested on mIRC 6.15)&lt;br /&gt;
 ;&lt;br /&gt;
 ;  last edit: Sun Jun 06 2004&lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ;What does this script do?&lt;br /&gt;
 ;&lt;br /&gt;
 ;  updates the IAL by doing /who chan1,chan2,chan3 etc&lt;br /&gt;
 ;  if a channel is too big, /who nick1,nick2,nick3 etc is done untill the IAL for the channel is   updated &lt;br /&gt;
 ;  script updates from smallest to the biggest channel&lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ;How to use this script?&lt;br /&gt;
 ;&lt;br /&gt;
 ;  config the options below&lt;br /&gt;
 ;  /ialupdate can be used to make the script update the IAL without waiting for the timer to  trigger it&lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ;Why is this script good?&lt;br /&gt;
 ;&lt;br /&gt;
 ;  sending /who chan for every channel is not needed and goes slow (lag)&lt;br /&gt;
 ;  sending /who chan on join may cause Excess Flood or Max sendQ exceeded&lt;br /&gt;
 ;  sending /who chan1,chan2,chan3 can be much faster, but only if there are not too many results  (Max sendQ exceeded) &lt;br /&gt;
 ;&lt;br /&gt;
 ;&lt;br /&gt;
 ;  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS MAX.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 [[alias]] -l max.who {&lt;br /&gt;
  ; maximum number of replies in a WHO, too big may cause &#039;Max sendQ exceeded&#039; disconnection&lt;br /&gt;
  ; too low may take the script a long time to update the IAL, 500 or 400 should be fine for most situations&lt;br /&gt;
  ![[return]] 700&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS LEN.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias -l len.who {&lt;br /&gt;
  ; maximum length of the /who &amp;lt;string&amp;gt;, too long may cause the server to ignore the command&lt;br /&gt;
  ; too low may slow things down, 400 should be fine in most cases&lt;br /&gt;
  !return 400&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS DELAY.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias -l delay.who {&lt;br /&gt;
  ; N seconds after the first join, the script starts to update the IAL&lt;br /&gt;
  !return 120&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS REPEAT.WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias -l repeat.who {&lt;br /&gt;
  ; wait N seconds after doing /who to do the next check and /who&lt;br /&gt;
  !return 30&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS SHOW ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias -l show.who {&lt;br /&gt;
  ; set this to 1 if you want the script to echo when the IAL is updated&lt;br /&gt;
  ; shows number of opers, number of users that are away, number of users that are deaf (+d),&lt;br /&gt;
  ; number of users that have fake host (+x)&lt;br /&gt;
  ; may slow things down, needs some checks / loops etc&lt;br /&gt;
  ; only shows when a whole channel is being who&#039;d&lt;br /&gt;
  !return 1&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; JOIN EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 on *:join:#:{&lt;br /&gt;
  ; we join, IAL not updated, timer does not run, start a timer&lt;br /&gt;
  [[if]] ([[$nick]] == [[$me]]) &amp;amp;&amp;amp; (![[$timer]]([[DollarPlus|$+]]([[$cid]],.ial-update.update))) {&lt;br /&gt;
    .![[timer]] $+ $cid $+ .ial-update.update 1 $$delay.who ial-update.update&lt;br /&gt;
   }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; LOAD EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 [[On_load|on *:load:]]{ ![[scon]] -at1 .!timer $!+ $!cid $!+ .ial-update.update 1 $$delay.who ial-update.update }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IALUPDATE ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias ialupdate { !echo -a IAL-update: $ial-update.update }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.UPDATE   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 alias -l ial-update.update {&lt;br /&gt;
  !var %c, %n&lt;br /&gt;
  ; IAL is set on&lt;br /&gt;
  if ($ial) {&lt;br /&gt;
    ; hash table does not exist, set a var with the channels we need to who&lt;br /&gt;
    if (![[$hget]]($+(ial-update.,$cid))) { ![[var]] %c = $ial-update.chan($max.who,$len.who)&lt;br /&gt;
      ; something is in there, send it to the hash alias, send the who request&lt;br /&gt;
      if (%c) { ial-update.hash %c | .!quote WHO %c }&lt;br /&gt;
      ; else no channels to who, set a var with the nicks we need to who&lt;br /&gt;
      else { !var %n = $ial-update.nick($max.who,$len.who)&lt;br /&gt;
        ; something is in there, send it to the hash alias, send the who request&lt;br /&gt;
        if (%n) { ial-update.hash %n | .!quote WHO %n  }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    ; we did a who or the hash table was not empty, start a timer to run this alias again&lt;br /&gt;
    if (%c) || (%n) || ($hget($+(ial-update.,$cid))) {&lt;br /&gt;
      .!timer $+ $cid $+ .ial-update.update 1 $$repeat.who ial-update.update&lt;br /&gt;
    }&lt;br /&gt;
    ; return some info&lt;br /&gt;
    if (%c) || (%n) { !return updating }&lt;br /&gt;
    elseif ($hget($+(ial-update.,$cid))) { !return already in progress }&lt;br /&gt;
    else { !return nothing to update }&lt;br /&gt;
  }&lt;br /&gt;
  ; ial is off return some info&lt;br /&gt;
  else { !return ERROR, IAL is turned off, /IAL on to enable }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.SORT  ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; $ial-update.sort&lt;br /&gt;
 ; sorts channels where the IAL is not updated&lt;br /&gt;
 ; &amp;lt;number of nicks&amp;gt;.&amp;lt;channel number&amp;gt;&lt;br /&gt;
 ; 127.1 &amp;lt;= means 127 users on channel 1&lt;br /&gt;
 alias -l ial-update.sort {&lt;br /&gt;
  !var %x = 1, %c&lt;br /&gt;
   ; loop through all common channels that we have with ourself&lt;br /&gt;
  ; $chan(0) returns the number of open channel windows,&lt;br /&gt;
  ; which does not mean you are on it (&amp;quot;keep channels open&amp;quot; option)&lt;br /&gt;
  [[while]] (%x &amp;lt;= $comchan($me,0)) {&lt;br /&gt;
    ; check if the ial is not updated or busy, add it to a var&lt;br /&gt;
    if ([[$chan]]($comchan($me,%x)).ial == [[$false]]) { !var %c =  [[$addtok]](%c,$+($nick([[$comchan]]($me,%x),0),.,%x),32) }&lt;br /&gt;
    !inc %x&lt;br /&gt;
  }&lt;br /&gt;
  ; return it sorted&lt;br /&gt;
  !return [[$sorttok]](%c,32,n)&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.MAX ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; $ial-update.max(N)&lt;br /&gt;
 ; N maximum number of nicks to request at once&lt;br /&gt;
 ; this alias returns the channels to ial based on the info provided by $ial-update.sort&lt;br /&gt;
 ; #chan1,#chan2,#chan3&lt;br /&gt;
 alias -l ial-update.max {&lt;br /&gt;
  !var %x = 1, %t = 0, %c = $ial-update.sort, %w&lt;br /&gt;
  ; loop through the channels and as long as %t smaller then $1, increase %t&lt;br /&gt;
  while (%x &amp;lt;= [[$numtok]](%c,32)) &amp;amp;&amp;amp; (%t &amp;lt; $1) {&lt;br /&gt;
    !inc %t $gettok($gettok(%c,%x,32),1,46)&lt;br /&gt;
    ; if %t is greater then $1, stop the loop&lt;br /&gt;
    if (%t &amp;gt; $1) { !break }&lt;br /&gt;
    ; add it to a var&lt;br /&gt;
    !var %w = $addtok(%w,$gettok($gettok(%c,%x,32),2,46),32)&lt;br /&gt;
    !inc %x&lt;br /&gt;
  }&lt;br /&gt;
  !return %w&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.CHAN ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; $ial-update.chan(N,L)&lt;br /&gt;
 ; N maximum number of nicks to request at once&lt;br /&gt;
 ; L maximum length of the WHO request&lt;br /&gt;
 ; this alias is used to WHO channels&lt;br /&gt;
 alias -l ial-update.chan {&lt;br /&gt;
  !var %x = 1, %l = 0, %c = $ial-update.max($1), %w&lt;br /&gt;
  ; loop through the channels, as long as %l smaller then $2, increase %l for the length of the  channel&lt;br /&gt;
  while (%x &amp;lt;= $numtok(%c,32)) &amp;amp;&amp;amp; (%l &amp;lt; $2) {&lt;br /&gt;
    !inc %l $len($comchan($me,[[$gettok]](%c,%x,32)))&lt;br /&gt;
    ; %l greater then $2, stop the loop&lt;br /&gt;
    if (%l &amp;gt; $2) { !break }&lt;br /&gt;
    ; add it to the var&lt;br /&gt;
    !var %w = $addtok(%w,$comchan($me,[[$gettok]](%c,%x,32)),44)&lt;br /&gt;
    !inc %x&lt;br /&gt;
  }&lt;br /&gt;
  !return %w&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.NICK ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; $ial-update.nick(N,L)&lt;br /&gt;
 ; N maximum number of nicks to request at once&lt;br /&gt;
 ; L maximum length of the WHO request&lt;br /&gt;
 ; this alias is used to WHO nicks&lt;br /&gt;
 alias -l ial-update.nick {&lt;br /&gt;
  !var %x = 1&lt;br /&gt;
  ; loop through the channels untill we found one where the IAL isnt updated&lt;br /&gt;
  while ($chan($comchan($me,%x)).ial != $false) &amp;amp;&amp;amp; (%x &amp;lt;= $comchan($me,0)) {&lt;br /&gt;
    ![[inc]] %x&lt;br /&gt;
  }&lt;br /&gt;
  ; ial is not updated, set vars&lt;br /&gt;
  if ($chan($comchan($me,%x)).ial == $false) { !var %y = 1, %t = 0, %l = 0, %w&lt;br /&gt;
    ; loop &lt;br /&gt;
    while (%t &amp;lt;= $1) &amp;amp;&amp;amp; (%l &amp;lt; $2) &amp;amp;&amp;amp; (%y &amp;lt;= $nick($comchan($me,%x),0)) {&lt;br /&gt;
      ; ial for that nick isnt updated, increase %l&lt;br /&gt;
      if (!$ial($nick($comchan($me,%x),%y))) {&lt;br /&gt;
        !inc %l $len($nick($comchan($me,%x),%y))&lt;br /&gt;
        ; if greater then $2, stop the loop&lt;br /&gt;
        if (%l &amp;gt; $2) { !break }&lt;br /&gt;
        ; add it to the var&lt;br /&gt;
        !var %w = $addtok(%w,$nick($comchan($me,%x),%y),44)&lt;br /&gt;
      }&lt;br /&gt;
      !inc %y&lt;br /&gt;
    }&lt;br /&gt;
    !return %w&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ALIAS IAL-UPDATE.HASH ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; /ial-update.hash &amp;lt;things&amp;gt; -remove&lt;br /&gt;
 alias -l ial-update.hash {&lt;br /&gt;
  ; $2 is not there, set a var&lt;br /&gt;
  if ($2 == $null) { !var %x = $numtok($1,44)&lt;br /&gt;
    ; loop through each part seperated with a comma, add it to a hash table&lt;br /&gt;
    while (%x) { !hadd -m $+(ial-update.,$cid) $gettok($1,%x,44) 1 | !dec %x }&lt;br /&gt;
    ; add mask&lt;br /&gt;
    !hadd -m $+(ial-update.,$cid) -mask $1&lt;br /&gt;
  }&lt;br /&gt;
  ; $2 is -remove, set a var&lt;br /&gt;
  elseif ($2 == -remove) { !var %x = $numtok($1,44)&lt;br /&gt;
    ; loop through each part seperated with a comma, remove it from the hash table&lt;br /&gt;
    while (%x) { if ($hget($+(ial-update.,$cid))) { !hdel $+(ial-update.,$cid) $gettok($1,%x,44) } | !dec %x }&lt;br /&gt;
    ; del mask&lt;br /&gt;
    !hdel $+(ial-update.,$cid) -mask&lt;br /&gt;
    ; check hash table, free hash table&lt;br /&gt;
    if ($hget($+(ial-update.,$cid),0).item == 0) &amp;amp;&amp;amp; ($hget($+(ial-update.,$cid))) { !hfree $+(ial-update.,$cid) }&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RAW 352 WHO ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; 352 &amp;lt;you&amp;gt; &amp;lt;channel&amp;gt; &amp;lt;user&amp;gt; &amp;lt;host&amp;gt; &amp;lt;server&amp;gt; &amp;lt;nick&amp;gt; &amp;lt;flags&amp;gt; :&amp;lt;distance&amp;gt; &amp;lt;realname&amp;gt;&lt;br /&gt;
 [[Raw_352|raw 352]]:&amp;amp; &amp;amp; &amp;amp; &amp;amp; &amp;amp; &amp;amp; &amp;amp; &amp;amp; *: {&lt;br /&gt;
  ; chan or nick are in the hash table&lt;br /&gt;
  if ($hget($+(ial-update.,$cid),$2)) || ($hget($+(ial-update.,$cid),$6)) {&lt;br /&gt;
    ; check setting, set a var&lt;br /&gt;
    if ($show.who == 1) &amp;amp;&amp;amp; ($hget($+(ial-update.,$cid),$2)) &amp;amp;&amp;amp; ($comchan($6,0)) { !var %x = $comchan($6,0)&lt;br /&gt;
      ; loop, set a var&lt;br /&gt;
      while (%x) { !var %c = $comchan($6,%x)&lt;br /&gt;
        ; check has table&lt;br /&gt;
        if ($hget($+(ial-update.,$cid),%c)) {&lt;br /&gt;
          ; * meaning oper isin $7, increase&lt;br /&gt;
          if (* isin $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),oper) }&lt;br /&gt;
          ; G meaning Gone isin $7, increase&lt;br /&gt;
          if (G isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),away) }&lt;br /&gt;
          ; d meaning deaf isin $7, increase&lt;br /&gt;
          if (d isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),deaf) }&lt;br /&gt;
          ; x meaning fake host isin $7, increase&lt;br /&gt;
          if (x isincs $7) { !hinc $+(ial-update.,$cid) $+(%c,$chr(44),xhost) }&lt;br /&gt;
        }&lt;br /&gt;
        !dec %x&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    ; stop mirc from showing this raw&lt;br /&gt;
    ![[haltdef]]&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RAW 315 WHO END ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 ; raw 315 &amp;lt;you&amp;gt; &amp;lt;requested&amp;gt; :End of /who list.&lt;br /&gt;
 [[Raw_315|raw 315]]:&amp;amp; &amp;amp; end of /WHO list.: {&lt;br /&gt;
  ; check -mask in hash table&lt;br /&gt;
  if ($hget($+(ial-update.,$cid),-mask) == $2) {&lt;br /&gt;
    ; check setting, set a var&lt;br /&gt;
    if ($show.who == 1) { !var %x = $numtok($2,44)&lt;br /&gt;
      ; loop, we are on the channel, set var&lt;br /&gt;
      while (%x) { if ($me ison $gettok($2,%x,44)) { !var %c = $gettok($2,%x,44)&lt;br /&gt;
          ; oper info&lt;br /&gt;
          !var %oper = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),oper)),$ifmatch,0)&lt;br /&gt;
          !var %oper = %oper / $round($calc(%oper / $nick(%c,0) * 100),1) $+ % Oper&lt;br /&gt;
          ; away info&lt;br /&gt;
          !var %away = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),away)),$ifmatch,0)&lt;br /&gt;
          !var %away = %away / $round($calc(%away / $nick(%c,0) * 100),1) $+ % Away&lt;br /&gt;
          ; deaf info&lt;br /&gt;
          !var %deaf = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),deaf)),$ifmatch,0)&lt;br /&gt;
          !var %deaf = %deaf / $round($calc(%deaf / $nick(%c,0) * 100),1) $+ % deaf&lt;br /&gt;
          ; xhost info&lt;br /&gt;
          !var %xhost = $iif($hget($+(ial-update.,$cid),$+(%c,$chr(44),xhost)),$ifmatch,0)&lt;br /&gt;
          !var %xhost = %xhost / $round($calc(%xhost / $nick(%c,0) * 100),1) $+ % x-host&lt;br /&gt;
          ; echo&lt;br /&gt;
          !echo -t $gettok($2,%x,44) * IAL updated ( $+ %oper ---- %away ---- %deaf ---- %xhost $+ )&lt;br /&gt;
        }&lt;br /&gt;
        ; remove from hash table&lt;br /&gt;
        ![[hdel]] $+(ial-update.,$cid) $+(%c,$chr(44),oper) | !hdel $+(ial-update.,$cid) $+(%c,$chr(44),away)&lt;br /&gt;
        !hdel $+(ial-update.,$cid) $+(%c,$chr(44),deaf) | !hdel $+(ial-update.,$cid) $+(%c,$chr(44),xhost)&lt;br /&gt;
        !dec %x&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    ; remove the items from the hash table&lt;br /&gt;
    ial-update.hash $2 -remove&lt;br /&gt;
    !haltdef&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; DISCONNECT EVENT ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;&lt;br /&gt;
 [[On_disconnect|on *:disconnect:]]{ if ($hget($+(ial-update.,$cid))) { ![[hfree]] $+(ial-update.,$cid) } }&lt;br /&gt;
&lt;br /&gt;
[[Category:IAL]][[Category:Script_Archive]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Bread&amp;diff=1571</id>
		<title>Bread</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Bread&amp;diff=1571"/>
		<updated>2006-07-23T14:45:28Z</updated>

		<summary type="html">&lt;p&gt;Saturn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The bread command is used to read content from a file in to a [[Binary Files|binary file]].&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;bread [-t] &amp;lt;filename&amp;gt; &amp;lt;S&amp;gt; &amp;lt;N&amp;gt; &amp;lt;&amp;amp;binvar&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
This reads N bytes starting at the Sth byte position in the file and stores the result in the binary variable &amp;amp;binvar.&lt;br /&gt;
&lt;br /&gt;
S is zero-based: the first byte of the file has position 0. To read the whole file, use [[$file]](&amp;lt;filename&amp;gt;).size as value for N.&lt;br /&gt;
&lt;br /&gt;
The -t switch reads data up to the next CR/LF.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
 bread versions.txt 27 100 &amp;amp;binvar &lt;br /&gt;
This will read in to the binary variable &#039;&#039;&amp;amp;binvar&#039;&#039; from the &#039;&#039;27&#039;&#039;th position of &#039;&#039;versions.txt&#039;&#039;, the follows &#039;&#039;100&#039;&#039; characters, this will include all [[$crlf]].&lt;br /&gt;
At the time of writing, the 27th posistion is the start of the 3rd line.&lt;br /&gt;
 17/02/2006 - mIRC v6.17 &#039;&#039;&#039;Line 1&#039;&#039;&#039; which is 23 characters&lt;br /&gt;
 followed by two $crlf (which is two characters each)&lt;br /&gt;
You can view what is in the varible with the following code:&lt;br /&gt;
 echo -ag $bvar(&amp;amp;binvar,1,100)&lt;br /&gt;
 &#039;&#039;or&#039;&#039;&lt;br /&gt;
 echo -ag $bvar(&amp;amp;binvar,1,100).text&lt;br /&gt;
The latter will show you the text output as if you was looking at the information in a text editor.  The first would show you the each characters ascii code.  Looking at the ascii codes can help you see if the line starts with a space or see where new lines are etc.&lt;br /&gt;
&lt;br /&gt;
== Note ==&lt;br /&gt;
Note that if you want to read from the start of the file, posistion 0 is the first character in the file.&lt;br /&gt;
&lt;br /&gt;
[[Category:Binary Files]]&lt;br /&gt;
[[Category:Commands]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Clear-Chanlev_Script_for_QuakeNet&amp;diff=2371</id>
		<title>Clear-Chanlev Script for QuakeNet</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Clear-Chanlev_Script_for_QuakeNet&amp;diff=2371"/>
		<updated>2006-04-12T21:59:45Z</updated>

		<summary type="html">&lt;p&gt;Saturn: cc.remove explicitly set to $false at start now, thanks faile&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Clear-Chanlev Script by Kickchon (for Q and L on QuakeNet) (v2.0)&lt;br /&gt;
This script removes all known users on a #channel except owners or removes Q/L completely from #channel.&lt;br /&gt;
&lt;br /&gt;
 ; # Clear-Chanlev Script by Kickchon (for [[Q]] and [[L]] on QuakeNet) (v2.0)&lt;br /&gt;
 ; # This script removes all known users on a #channel except owners or removes Q/L completely from #channel.&lt;br /&gt;
 ; # Please do nothing after typing /clearchanlev until you get a finish/error message.&lt;br /&gt;
 ;&lt;br /&gt;
 ; # Needs Owner Access on specified #channel and you have to be authed.&lt;br /&gt;
 ; # It will not remove other Owners.&lt;br /&gt;
 ;&lt;br /&gt;
 ; # Use /clearchanlev #channel or /clearchanlev #channel -remove if you want to remove Q/L from a channel.&lt;br /&gt;
 ;&lt;br /&gt;
 ; # Kickchon, staff member on Quakenet&lt;br /&gt;
 ;&lt;br /&gt;
 ; # If you think there&#039;s a bug in this Script, please contact someone in #help.script on Quakenet.&lt;br /&gt;
 &lt;br /&gt;
 [[Aliases|alias]] clearchanlev {&lt;br /&gt;
  [[if-Then-Else|if]] (!$1) {&lt;br /&gt;
    [[echo]] [[$color]](info) -at *** Clear-Chanlev: You need to specify the channel.&lt;br /&gt;
  }&lt;br /&gt;
  [[if-Then-Else|elseif]] (Q !ison $1) &amp;amp;&amp;amp; (L !ison $1) {&lt;br /&gt;
    echo $color(info) -at *** Clear-Chanlev: There is no Q or L bot on $1 $+ .&lt;br /&gt;
  }&lt;br /&gt;
  [[if-Then-Else|else]] {&lt;br /&gt;
    set %cc.what getlname&lt;br /&gt;
    set %cc.bot $iif(Q ison $1,Q,L)&lt;br /&gt;
    set %cc.chan $1&lt;br /&gt;
    if ($2 == -remove) { [[set]] %cc.remove $true }&lt;br /&gt;
    else { [[set]] %cc.remove $false }&lt;br /&gt;
    echo $color(info) -at *** Clear-Chanlev: Getting your %cc.bot $+ -Account Name.&lt;br /&gt;
    .enable #clearchanlev&lt;br /&gt;
    .[[msg]] %cc.bot whois [[$me]]&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #[[Creating Groups|clearchanlev]] off&lt;br /&gt;
 &lt;br /&gt;
 [[On_notice|on ^*:NOTICE]]:*:*:{&lt;br /&gt;
  if ($nick == %cc.bot) {&lt;br /&gt;
    if (%cc.what == getlname) {&lt;br /&gt;
      if ($1 == $me) &amp;amp;&amp;amp; ($3 == authed) {&lt;br /&gt;
        set %cc.account $left($5,-1)&lt;br /&gt;
      }&lt;br /&gt;
      if ($1- == End of list.) {&lt;br /&gt;
        if (%cc.account) {&lt;br /&gt;
          echo $color(info) -at *** Clear-Chanlev: Getting Userlist of %cc.chan $+ .&lt;br /&gt;
          set %cc.what getchanlev&lt;br /&gt;
          .msg %cc.bot chanlev %cc.chan&lt;br /&gt;
        }&lt;br /&gt;
        else {&lt;br /&gt;
          echo $color(info) -at *** Clear-Chanlev: You are not authed. Please auth before trying to clear a chanlev-list.&lt;br /&gt;
          unset %cc.*&lt;br /&gt;
          .[[disable]] #clearchanlev&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    elseif (%cc.what == getchanlev) {&lt;br /&gt;
     if ($1 != %cc.account) &amp;amp;&amp;amp; (End of* !iswm $1-) &amp;amp;&amp;amp; (Users for channel* !iswm $1-) &amp;amp;&amp;amp; (Authname* !iswm $1-) &amp;amp;&amp;amp; ($1- != $str(-,29)) &amp;amp;&amp;amp; $&amp;amp;&lt;br /&gt;
        ($1 != Channeltype:) &amp;amp;&amp;amp; (Known users* !iswm $1-) {&lt;br /&gt;
        if (n !isin $iif(%cc.bot == Q,$3,$2)) {&lt;br /&gt;
          [[write]] clearchanlev.txt CHANLEV %cc.chan # [ $+ [ $1 ] ] $iif(%cc.bot == Q,-amotv,-amovg)&lt;br /&gt;
        }&lt;br /&gt;
        elseif (n isin $iif(%cc.bot == Q,$3,$2)) {&lt;br /&gt;
          set %cc.noremove $true&lt;br /&gt;
        }&lt;br /&gt;
      }&lt;br /&gt;
      elseif ($1 == %cc.account) &amp;amp;&amp;amp; (n !isin [[$iif]](%cc.bot == Q,$3,$2)) {&lt;br /&gt;
        .[[remove]] &amp;quot;clearchanlev.txt&amp;quot;&lt;br /&gt;
        [[unset]] %cc.*&lt;br /&gt;
        .disable #clearchanlev&lt;br /&gt;
        echo $color(info) -at *** Clear-Chanlev: You are not the owner of that channel. Halting...&lt;br /&gt;
      }&lt;br /&gt;
      elseif (End* [[If-Then-Else#The_Operators|iswm]] $1-) {&lt;br /&gt;
        if (%cc.remove) {&lt;br /&gt;
          if (%cc.noremove) {&lt;br /&gt;
            echo $color(info) -at *** Clear-Chanlev: You may not remove %cc.bot $+ . You are not the only owner on %cc.chan $+ .&lt;br /&gt;
            .remove &amp;quot;clearchanlev.txt&amp;quot;&lt;br /&gt;
            unset %cc.*&lt;br /&gt;
            .disable #clearchanlev&lt;br /&gt;
            [[halt]]&lt;br /&gt;
          }&lt;br /&gt;
          else {&lt;br /&gt;
            write clearchanlev.txt CHANLEV %cc.chan # [ $+ [ %cc.account ] ] $iif(%cc.bot == Q,-amnotv,-amnovg)&lt;br /&gt;
          }&lt;br /&gt;
        }&lt;br /&gt;
        set %cc.what removeusers&lt;br /&gt;
        echo $color(info) -at *** Clear-Chanlev: There are $lines(clearchanlev.txt) Users to remove. It will take about $&amp;amp;&lt;br /&gt;
          [[$calc]]([[$lines]](clearchanlev.txt)*2) seconds. Removing...&lt;br /&gt;
        .[[play]] %cc.bot clearchanlev.txt 2000&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    [[haltdef]]&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[On_playend|on *:PLAYEND]]:{&lt;br /&gt;
  if ([[$nopath]]([[$filename]]) == clearchanlev.txt) {&lt;br /&gt;
    echo $color(info) -at *** Clear-Chanlev: Successfully Removed $iif(%cc.remove,$iif(%cc.bot == Q,Q,L) from,all Non-Owners on) %cc.chan $+ .&lt;br /&gt;
    if (!%cc.remove) { .msg %cc.bot chanlev %cc.chan }&lt;br /&gt;
    unset %cc.*&lt;br /&gt;
    .remove &amp;quot;clearchanlev.txt&amp;quot;&lt;br /&gt;
    .disable #clearchanlev&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #clearchanlev end&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;br /&gt;
{{Author|Kickchon}}&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1762</id>
		<title>Access Levels</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1762"/>
		<updated>2006-04-12T18:35:32Z</updated>

		<summary type="html">&lt;p&gt;Saturn: and other small fixes, more commands need to be anchored here though&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 -tc join $chan $nick 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. For example:&lt;br /&gt;
 on me:*:JOIN:#: { echo -t $chan I joined $chan }&lt;br /&gt;
This is the same as the following code:&lt;br /&gt;
 on *:JOIN:#: { if ($nick == $me) { echo -t $chan I joined $chan } }&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1354</id>
		<title>Access Levels</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1354"/>
		<updated>2006-04-12T18:32:50Z</updated>

		<summary type="html">&lt;p&gt;Saturn: and consistency in spacing around brackets&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. For example:&lt;br /&gt;
 on me:*:JOIN:#: { ... }&lt;br /&gt;
This is the same as the following code:&lt;br /&gt;
 on *:JOIN:#: { 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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1353</id>
		<title>Access Levels</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1353"/>
		<updated>2006-04-12T18:31:47Z</updated>

		<summary type="html">&lt;p&gt;Saturn: and added some consistency in use of #channel&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. For example:&lt;br /&gt;
 on me:*:JOIN:#:{ ... }&lt;br /&gt;
This is the same as the following code:&lt;br /&gt;
 on *:JOIN:#:{ 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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1352</id>
		<title>Access Levels</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Access_Levels&amp;diff=1352"/>
		<updated>2006-04-12T18:30:56Z</updated>

		<summary type="html">&lt;p&gt;Saturn: added example to me: prefix&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. For example:&lt;br /&gt;
 on me:*:JOIN:#channel:{ ... }&lt;br /&gt;
This is the same as the following code:&lt;br /&gt;
 on *:JOIN:#channel:{ 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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1342</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=1342"/>
		<updated>2006-04-12T00:06:11Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* Deleting unwanted items from a hash table */&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&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 &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;
&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:Hash_Table&amp;diff=1341</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=1341"/>
		<updated>2006-04-12T00:01:41Z</updated>

		<summary type="html">&lt;p&gt;Saturn: from the between-1am-and-2am dept.: added &amp;quot;deleting unwanted items&amp;quot; bit&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&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 &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;
&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.&lt;br /&gt;
[[Category:MIRC Help]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Unbannick&amp;diff=1553</id>
		<title>Unbannick</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Unbannick&amp;diff=1553"/>
		<updated>2006-04-03T14:49:43Z</updated>

		<summary type="html">&lt;p&gt;Saturn: oops.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Stub}}&lt;br /&gt;
This script provides an alias to unban a &amp;quot;nick&amp;quot; (respectivly his address) even if this user isn&#039;t on the channel. Therefor, it uses the [[who|/who]] command to get the current address of a nickname.&lt;br /&gt;
&lt;br /&gt;
The syntax is: /unbannick &amp;lt;channel&amp;gt; &amp;lt;nickname&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additionally, it will drop the one unbanning this nick a message and the one that got unbanned a notice. The part about uhexec will be without further comments.&lt;br /&gt;
 &lt;br /&gt;
 ; on disconnect we clear the hashtable uhexec has used.&lt;br /&gt;
 [[On_disconnect|on *:DISCONNECT]]:[[if]] ($hget(uhexec)) [[hdel]] -w uhexec $cid $+ .*&lt;br /&gt;
 [[alias]] -l uhq [[return]] [[$iif]]([[$hget]](uhexec,$+($cid,.,[[$1]])),$v1,$iif($1 !isnum,0))&lt;br /&gt;
 alias -l uhnext {&lt;br /&gt;
  $iif($0 &amp;gt; 1,hadd -m,hdel) uhexec $+($cid,.,$uhq($1) $2-)&lt;br /&gt;
  [[hadd]] uhexec $+($cid,.,$1) $iif($uhq($1) &amp;lt; 64,$calc($v1 + 1),0)&lt;br /&gt;
 }&lt;br /&gt;
 alias -l uhexec {&lt;br /&gt;
  [[if]] ([[$status]] == connected) || ([[$ial]]($1).addr != [[$null]]) {&lt;br /&gt;
    uhnext head $1-&lt;br /&gt;
    [[userhost]] $1&lt;br /&gt;
  }&lt;br /&gt;
  [[else]] $2- $ial($1).addr&lt;br /&gt;
 }&lt;br /&gt;
 [[Raw_302|raw $302]]:/^\S+( (\S+?)\*?=[+-](\S+)|) ?$/:{&lt;br /&gt;
  [[tokenize]] 32 $uhq($uhq(tail))&lt;br /&gt;
  if ($0) &amp;amp;&amp;amp; (([[$regml]](0) &amp;lt; 2) || ($1 == $regml(2))) {&lt;br /&gt;
    uhnext tail&lt;br /&gt;
    $2- $regml(3)&lt;br /&gt;
    [[halt]]&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 alias -l uncb {&lt;br /&gt;
  ; &amp;lt;chan&amp;gt; &amp;lt;nick&amp;gt; [host]&lt;br /&gt;
  if ($3 == $null) return&lt;br /&gt;
  [[var]] %i = 1, %b, %a = $+($2,!,$3)&lt;br /&gt;
  [[while]] ($ibl($1,%i) != $null) {&lt;br /&gt;
    if ($v1 iswm %a) {&lt;br /&gt;
      %b = %b $v1&lt;br /&gt;
      if ([[$numtok]](%b,32) == [[$modespl]]) {&lt;br /&gt;
        [[mode]] $1 - $+ [[$str]](b,$numtok(%b,32)) %b&lt;br /&gt;
        %b =&lt;br /&gt;
      }&lt;br /&gt;
    }&lt;br /&gt;
    [[inc]] %i&lt;br /&gt;
  }&lt;br /&gt;
  if (%b != $null) mode $1 - $+ $str(b,$numtok(%b,32)) %b&lt;br /&gt;
  [[msg]] $1 Unbanned $2 upon request&lt;br /&gt;
  [[notice]] $2 You&#039;re now unbanned on $1&lt;br /&gt;
 }&lt;br /&gt;
 ; actually provide the alias (Syntax: /unbannick &amp;lt;chan&amp;gt; &amp;lt;nick&amp;gt;)&lt;br /&gt;
 alias unbannick uhexec $2 uncb $1-2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Mailcheck&amp;diff=1811</id>
		<title>Mailcheck</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Mailcheck&amp;diff=1811"/>
		<updated>2006-04-01T10:00:39Z</updated>

		<summary type="html">&lt;p&gt;Saturn: small bug fixed, thanks to ArKanis&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This script is supposed to check your POP3 mailaccount and return whether you have new mails or not.&lt;br /&gt;
You will find a little alias at the beginning where you have to put your login details in.&lt;br /&gt;
&lt;br /&gt;
 ; this is the alias where you have to put your login details in by replacing the &amp;lt;...&amp;gt;.&lt;br /&gt;
 ; lets actually make a new alias called mailoptions &lt;br /&gt;
 [[alias]] mailoptions {&lt;br /&gt;
  ; check if we get something like $mailoptions(emailserver) or $mailoptions(emailport) and return it&lt;br /&gt;
  ; like pop.gmx.net&lt;br /&gt;
  [[if]] ([[$1-|$1]] == emailserver) { [[return]] &amp;lt;your email server&amp;gt; }&lt;br /&gt;
  ; this is normally 110&lt;br /&gt;
  elseif ($1 == emailport) { return &amp;lt;your email port&amp;gt; }&lt;br /&gt;
  ; probably your email address&lt;br /&gt;
  elseif ($1 == emailuser) { return &amp;lt;your email user&amp;gt; }&lt;br /&gt;
  ; this is your password&lt;br /&gt;
  elseif ($1 == emailpass) { return &amp;lt;your email pass&amp;gt; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias you can use to start checking your account&lt;br /&gt;
 ; lets make another alias called mailcheck&lt;br /&gt;
 alias mailcheck { &lt;br /&gt;
  ; at first we need to check if all details are given. Only if they are, we will continue&lt;br /&gt;
  if ($mailoptions(emailserver)) &amp;amp;&amp;amp; ($mailoptions(emailport)) &amp;amp;&amp;amp; (mailsoptions(emailuser)) &amp;amp;&amp;amp; (mailsoptions(emailpass)) {&lt;br /&gt;
    ; this command will close a socket called &amp;quot;mailcheck&amp;quot; if one exists.&lt;br /&gt;
    [[sockclose]] mailcheck &lt;br /&gt;
    ; here we open a new socket called mailcheck to our server on the given port&lt;br /&gt;
    [[sockopen]] mailcheck $mailoptions(emailserver) $mailoptions(emailport) &lt;br /&gt;
    ; we set a variable for a later alias&lt;br /&gt;
    set %mailcheck_var 0&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will trigger if the new socket called mailcheck has been opened&lt;br /&gt;
 [[On_sockopen|on *:Sockopen]]:mailcheck: {&lt;br /&gt;
  ; lets check if there are any errors, if they are, echo it and halt&lt;br /&gt;
  if ([[$sockerr]] &amp;gt; 0) { [[echo]] -a ERROR | [[halt]] }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this event will trigger when we receive any data through the socket&lt;br /&gt;
 [[On_sockread|on *:Sockread]]:mailcheck: {&lt;br /&gt;
  ; sockread will put the data in a variable, here %temp&lt;br /&gt;
  [[sockread]] %temp&lt;br /&gt;
  ; the alias mailcheck_read, that we will define later, is supposed to handle eveerything we receive&lt;br /&gt;
  mailcheck_read %temp&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 ; this is the alias mailcheck_read that will handle everything&lt;br /&gt;
 ; lets start it&lt;br /&gt;
 alias mailcheck_read {&lt;br /&gt;
  ; increase the %mailcheck_var variable, we have set to 0 in the mailcheck alias, once everytime we get some new data&lt;br /&gt;
  [[inc]] %mailcheck_var 1&lt;br /&gt;
  ; we check if $1 is +OK. Read the pop3 protocol to get more info about it&lt;br /&gt;
  if $1 == +OK {&lt;br /&gt;
    ; if its the first time we get some data, send &amp;quot;user &amp;lt;username&amp;gt;&amp;quot; to the socket.&lt;br /&gt;
    if (%mailcheck_var == 1) { .[[sockwrite]] -n mailcheck user $mailoptions(emailuser) }&lt;br /&gt;
    ; after that, we need to send our password   &lt;br /&gt;
    if (%mailcheck_var == 2) { .sockwrite -n mailcheck pass $mailoptions(emailpass) }&lt;br /&gt;
    ; after sending username and password, we need to tell the server what we actually want to do. We want to know if there are new emails. So send &amp;quot;stat&amp;quot;.&lt;br /&gt;
    if (%mailcheck_var == 3) { .sockwrite -n mailcheck stat }&lt;br /&gt;
    ; if we are here, %temp will contain whether we have new mails or now. $2 is the number of new mails, being 0 or 1 or any other number.&lt;br /&gt;
    if (%mailcheck_var == 4) {&lt;br /&gt;
      ; lets echo this to the status window&lt;br /&gt;
      echo -s New mails: $2&lt;br /&gt;
      ; closing the socket at the end as we are done&lt;br /&gt;
      sockclose mailcheck&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
[[Category:Script Archive]]&lt;br /&gt;
[[Category:Socket]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1576</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=1576"/>
		<updated>2006-03-27T22:42:05Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* The Operators */&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 the internal ban list for channel v2&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 #mychan) ; returns $true if &#039;&#039;idiot!*@*&#039;&#039; is in your [[:Category:IBL|Internal Ban List]] for the channel #mychan.&lt;br /&gt;
 if ($ial($me) isban $chan) ; returns $true if you are banned on the current channel.&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that isban performs two different checks, depending on whether v1 contains wildcards or not:&lt;br /&gt;
* if v1 contains wildcards, isban will return $true if v1 is an exact ban in the IBL;&lt;br /&gt;
* if v1 does not contain wildcards, isban will return $true if one or more bans match that address.&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=If-Then-Else&amp;diff=1314</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=1314"/>
		<updated>2006-03-27T22:41:38Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* isban */&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 #mychan) ; returns $true if &#039;&#039;idiot!*@*&#039;&#039; is in your [[:Category:IBL|Internal Ban List]] for the channel #mychan.&lt;br /&gt;
 if ($ial($me) isban $chan) ; returns $true if you are banned on the current channel.&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that isban performs two different checks, depending on whether v1 contains wildcards or not:&lt;br /&gt;
* if v1 contains wildcards, isban will return $true if v1 is an exact ban in the IBL;&lt;br /&gt;
* if v1 does not contain wildcards, isban will return $true if one or more bans match that address.&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=2682</id>
		<title>User:Saturn</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=2682"/>
		<updated>2006-01-30T16:07:43Z</updated>

		<summary type="html">&lt;p&gt;Saturn: yearly update&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Babel-2|nl|en-3}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[Image:Saturn.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&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 van Moolenbroek&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;23&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;Country&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;The Netherlands&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;The eyes of truth are always watching you.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[[Category:Members]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1398</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1398"/>
		<updated>2006-01-27T14:14:59Z</updated>

		<summary type="html">&lt;p&gt;Saturn: well, um, actually i can do that too&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 either of the following two ways:&lt;br /&gt;
* Be invited by an [[Members|existing wiki editor]] (or an admin) and approved by the admins. Or,&lt;br /&gt;
* Write an example article for us, to show us your writing skills. It will be evaluated by the admins and you will be notified if the result is positive. You must submit your article [[Special:BeMember|here]], along with some personal details.&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;
&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
This wiki is a project launched by [http://script.quakenet.org #help.script] on [http://www.quakenet.org QuakeNet].&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1270</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1270"/>
		<updated>2006-01-27T14:09:49Z</updated>

		<summary type="html">&lt;p&gt;Saturn: needs some links to uh, somewhere, i suppose&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 either of the following two ways:&lt;br /&gt;
* Be invited by an [[Members|existing wiki editor]] (or an admin) and approved by the admins. Or,&lt;br /&gt;
* Write an example article for us, to show us your writing skills. It will be evaluated by the admins and you will be notified if the result is positive. You must submit your article [[Special:BeMember|here]], along with some personal details.&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;
&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
This wiki is a project launched by #help.script on QuakeNet.&lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1268</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1268"/>
		<updated>2006-01-19T22:27:02Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* This Wiki */&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 either of the following two ways:&lt;br /&gt;
* Be invited by an [[Members|existing wiki editor]] (or an admin) and approved by the admins. Or,&lt;br /&gt;
* Write an example article for us, to show us your writing skills. It will be evaluated by the admins and you will be notified if the result is positive. You must submit your article [[Special:BeMember|here]], along with some personal details.&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1265</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Main_Page&amp;diff=1265"/>
		<updated>2006-01-19T22:23:07Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /* This Wiki */&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 either of the following two ways:&lt;br /&gt;
* Be invited by an [[Members|existing wiki editor]] (or an admin) and approved by the admins. Or,&lt;br /&gt;
* Write an example article for us, to show us your writing skills. It will be evaluated by the admins and you will be notified if the result is positive. You must submit your article, along with some personal details, [[Special:BeMember|here]].&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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Category:File_Handling&amp;diff=4457</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=4457"/>
		<updated>2005-12-22T23:58:17Z</updated>

		<summary type="html">&lt;p&gt;Saturn: slightly better hopefully?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== General Explanation ==&lt;br /&gt;
In addition to several high-level file access methods, mIRC offers a low-level way of accessing files, which closely resembles the way that operating systems like Windows or UNIX allow programs to access files. The individual commands and identifiers in this category allow you to open a file, perform a number of (read/write) operations on it, and close it.&lt;br /&gt;
&lt;br /&gt;
First of all you have to open a file using [[Fopen|/fopen]]. When doing this, you have to specify a handle - in subsequent commands you can use this handle to refer to the open file. The handle is just a name that you, the scripter, can choose yourself. This is similar to how [[:Category:Socket|socket]] names work.&lt;br /&gt;
&lt;br /&gt;
Each open file has a &#039;&#039;file pointer&#039;&#039;. This file pointer is the current byte position in the file, and the read/write commands will always work from this position. Additionally, those commands will move the file pointer forward with as many bytes as they read/write. For example, if the file pointer is at byte 1055, and you use [[$fgetc]], then you will get the 1055th byte of the file, and the file pointer will move to 1056. When you&#039;ve just opened the file, the file pointer is set to the start of the file (byte 0); you can manually move the pointer to another position in the file by using [[Fseek|/fseek]].&lt;br /&gt;
&lt;br /&gt;
mIRC will lock an opened file from being accessed by other programs for as long as the file handle is open. After you&#039;ve used a file, you &#039;&#039;&#039;have to&#039;&#039;&#039; close it again, using [[Fclose|/fclose]]. That will write any changes you made to disk, and unlock the file.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note&#039;&#039;&#039; that you should check [[$ferr]] after every operation on the file (including 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>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Local_Variables&amp;diff=1139</id>
		<title>Local Variables</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Local_Variables&amp;diff=1139"/>
		<updated>2005-11-10T14:50:06Z</updated>

		<summary type="html">&lt;p&gt;Saturn: rewrite&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;
{{Author|Tovrleaf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=1026</id>
		<title>Inc</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=1026"/>
		<updated>2005-11-10T14:12:49Z</updated>

		<summary type="html">&lt;p&gt;Saturn: /inc&amp;#039;ed grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This increases the value of %var by value.&lt;br /&gt;
&lt;br /&gt;
 /inc [-cszuN] &amp;lt;%var&amp;gt; [value]&lt;br /&gt;
&lt;br /&gt;
Options explained:&lt;br /&gt;
 uN - increases %var once and [[unset|unsets]] it N seconds later.&lt;br /&gt;
 z  - decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
 s  - displays action in status window&lt;br /&gt;
 c  - increases %var once per second.&lt;br /&gt;
&lt;br /&gt;
If no value is given, default value is 1.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The /inc command is commonly used in [[While_loops|loops]].&lt;br /&gt;
 var %c = 1&lt;br /&gt;
 while (%c &amp;lt;= 4)  {&lt;br /&gt;
   ; do something&lt;br /&gt;
   ; continue, commands etc..&lt;br /&gt;
   inc %c&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Displays %c&#039;s values from 1 to 4.&lt;br /&gt;
More advanced example, just playing around.&lt;br /&gt;
&lt;br /&gt;
  1 alias exam_inc {&lt;br /&gt;
  2   [[set]] -s %x 1&lt;br /&gt;
  3   while (%x &amp;lt; 5) {&lt;br /&gt;
  4     inc -s %x&lt;br /&gt;
  5   }&lt;br /&gt;
  6   while (%x &amp;gt; 2) { &lt;br /&gt;
  7     inc -s %x -1 &lt;br /&gt;
  8   } &lt;br /&gt;
  9   inc -sz %x 2&lt;br /&gt;
 10 }&lt;br /&gt;
&lt;br /&gt;
In the following results the line numbers are added after ;. The results are:&lt;br /&gt;
 * Set %x to 1  ; 1&lt;br /&gt;
 * Inc %x to 2  ; 2-5&lt;br /&gt;
 * Inc %x to 3  ; 2-5&lt;br /&gt;
 * Inc %x to 4  ; 2-5&lt;br /&gt;
 * Inc %x to 5  ; 2-5&lt;br /&gt;
 * Inc %x to 4  ; 6-8&lt;br /&gt;
 * Inc %x to 3  ; 6-8&lt;br /&gt;
 * Inc %x to 2  ; 6-8&lt;br /&gt;
 * Inc %x to 4  ; 9 (notice increase with 2)&lt;br /&gt;
 * Inc %x to 3  ; 9&lt;br /&gt;
 * Inc %x to 2  ; 9&lt;br /&gt;
 * Inc %x to 1  ; 9&lt;br /&gt;
 * Unset %x     ; 9 (switch z unsets)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
To decrease a value, you can also use [[dec]].&lt;br /&gt;
&lt;br /&gt;
{{Author|Tovrleaf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=918</id>
		<title>Inc</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=918"/>
		<updated>2005-11-10T14:12:11Z</updated>

		<summary type="html">&lt;p&gt;Saturn: Reverted edit of Saturn, changed back to last version by Microbe&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This increases the value of %var by value.&lt;br /&gt;
&lt;br /&gt;
 /inc [-cszuN] &amp;lt;%var&amp;gt; [value]&lt;br /&gt;
&lt;br /&gt;
Options explained:&lt;br /&gt;
 uN - increases %var once and [[unset|unsets]] it N seconds later.&lt;br /&gt;
 z  - decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
 s  - displays action in status window&lt;br /&gt;
 c  - increases %var once per second.&lt;br /&gt;
&lt;br /&gt;
If no value is given, default value is 1.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
Increase is commonly used in [[While_loops|loops]].&lt;br /&gt;
 var %c = 1&lt;br /&gt;
 while (%c &amp;lt;= 4)  {&lt;br /&gt;
   ; do something&lt;br /&gt;
   ; continue, commands etc..&lt;br /&gt;
   inc %c&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Displays %c&#039;s values from 1 to 4.&lt;br /&gt;
More advantages example, just playing around.&lt;br /&gt;
&lt;br /&gt;
  1 alias exam_inc {&lt;br /&gt;
  2   [[set]] -s %x 1&lt;br /&gt;
  3   while (%x &amp;lt; 5) {&lt;br /&gt;
  4     inc -s %x&lt;br /&gt;
  5   }&lt;br /&gt;
  6   while (%x &amp;gt; 2) { &lt;br /&gt;
  7     inc -s %x -1 &lt;br /&gt;
  8   } &lt;br /&gt;
  9   inc -sz %x 2&lt;br /&gt;
 10 }&lt;br /&gt;
&lt;br /&gt;
In the following results the line numbers are added after ;. The results are:&lt;br /&gt;
 * Set %x to 1 ; 1&lt;br /&gt;
 * Inc %x to 2 ; 2-5&lt;br /&gt;
 * Inc %x to 3 ; 2-5&lt;br /&gt;
 * Inc %x to 4 ; 2-5&lt;br /&gt;
 * Inc %x to 5 ; 2-5&lt;br /&gt;
 * Inc %x to 4 ; 6-8&lt;br /&gt;
 * Inc %x to 3 ; 6-8&lt;br /&gt;
 * Inc %x to 2 ; 6-8&lt;br /&gt;
 * Inc %x to 4 ; 9 (notice increase with 2)&lt;br /&gt;
 * Inc %x to 3 ; 9&lt;br /&gt;
 * Inc %x to 2 ; 9&lt;br /&gt;
 * Inc %x to 1 ; 9&lt;br /&gt;
 * Unset %x    ; 9 (switch z unsets)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
To decrease a value, you can also use [[dec]].&lt;br /&gt;
&lt;br /&gt;
{{Author|Tovrleaf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=917</id>
		<title>Inc</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=Inc&amp;diff=917"/>
		<updated>2005-11-10T14:10:42Z</updated>

		<summary type="html">&lt;p&gt;Saturn: removed line numbers, /inc&amp;#039;ed grammar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This increases the value of %var by value.&lt;br /&gt;
&lt;br /&gt;
 /inc [-cszuN] &amp;lt;%var&amp;gt; [value]&lt;br /&gt;
&lt;br /&gt;
Options explained:&lt;br /&gt;
 uN - increases %var once and [[unset|unsets]] it N seconds later.&lt;br /&gt;
 z  - decreases %var until it reaches zero and then unsets it.&lt;br /&gt;
 s  - displays action in status window&lt;br /&gt;
 c  - increases %var once per second.&lt;br /&gt;
&lt;br /&gt;
If no value is given, default value is 1.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
The /inc command is commonly used in [[While_loops|loops]].&lt;br /&gt;
 var %c = 1&lt;br /&gt;
 while (%c &amp;lt;= 4)  {&lt;br /&gt;
   ; do something&lt;br /&gt;
   ; continue, commands etc..&lt;br /&gt;
   inc %c&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Displays %c&#039;s values from 1 to 4.&lt;br /&gt;
More advanced example, just playing around.&lt;br /&gt;
&lt;br /&gt;
 alias exam_inc {&lt;br /&gt;
   [[set]] -s %x 1&lt;br /&gt;
   while (%x &amp;lt; 5) {&lt;br /&gt;
     inc -s %x&lt;br /&gt;
   }&lt;br /&gt;
   while (%x &amp;gt; 2) { &lt;br /&gt;
     inc -s %x -1 &lt;br /&gt;
   } &lt;br /&gt;
   inc -sz %x 2&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the following results the line numbers are added after ;. The results are:&lt;br /&gt;
 * Set %x to 1  ; 1&lt;br /&gt;
 * Inc %x to 2  ; 2-5&lt;br /&gt;
 * Inc %x to 3  ; 2-5&lt;br /&gt;
 * Inc %x to 4  ; 2-5&lt;br /&gt;
 * Inc %x to 5  ; 2-5&lt;br /&gt;
 * Inc %x to 4  ; 6-8&lt;br /&gt;
 * Inc %x to 3  ; 6-8&lt;br /&gt;
 * Inc %x to 2  ; 6-8&lt;br /&gt;
 * Inc %x to 4  ; 9 (notice increase with 2)&lt;br /&gt;
 * Inc %x to 3  ; 9&lt;br /&gt;
 * Inc %x to 2  ; 9&lt;br /&gt;
 * Inc %x to 1  ; 9&lt;br /&gt;
 * Unset %x     ; 9 (switch z unsets)&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
To decrease a value, you can also use [[dec]].&lt;br /&gt;
&lt;br /&gt;
{{Author|Tovrleaf}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Variables]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$chat&amp;diff=4261</id>
		<title>$chat</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$chat&amp;diff=4261"/>
		<updated>2005-11-10T14:05:17Z</updated>

		<summary type="html">&lt;p&gt;Saturn: Reverted edit of Microbe, changed back to last version by Zyberdog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The $chat identifier can be used to return information about your [[DCC|dcc chat]] windows.&lt;br /&gt;
&lt;br /&gt;
 $chat(&#039;&#039;N&#039;&#039;/&#039;&#039;nick&#039;&#039;[,&#039;&#039;N&#039;&#039;])&lt;br /&gt;
&lt;br /&gt;
* Specifying &#039;&#039;N&#039;&#039; as 0 returns total number of dcc chat windows.&lt;br /&gt;
* If both &#039;&#039;nick&#039;&#039; and &#039;&#039;N&#039;&#039; is given, it will return the information on the &#039;&#039;N&#039;&#039;th window for that &#039;&#039;nick&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;Property&#039;&#039;&#039;    &#039;&#039;&#039;Meaning&#039;&#039;&#039;&lt;br /&gt;
 ip          returns the ip you connected to&lt;br /&gt;
 status      returns the status of the dcc chat connection&lt;br /&gt;
 logfile     returns the full path to the logfile for the dcc chat, or [[$false]] if logging is turned off&lt;br /&gt;
 stamp       returns the timestamp setting, [[$true]] or $false&lt;br /&gt;
 [[$wid|wid]]         returns the window id, numeric value&lt;br /&gt;
 [[$cid|cid]]         returns the connection id it was established under&lt;br /&gt;
 hwnd        returns the hwnd reference&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&lt;br /&gt;
 $chat(0)           ;returns the total number of open dcc chats&lt;br /&gt;
 $chat(1)           ;returns the nickname of the 1st dcc chat window&lt;br /&gt;
 $chat(2).ip        ;returns the ip address of the 2nd open dcc chat window&lt;br /&gt;
 $chat(Dana,2).wid  ;returns the window number of the second dcc chat window with the nick Dana&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
* [[DCC Chat]] - Explains how to initiate a dcc chat session&lt;br /&gt;
* [[DCC]] - General information on mIRC&#039;s dcc capabilities&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Window Identifiers]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$appstate&amp;diff=988</id>
		<title>$appstate</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$appstate&amp;diff=988"/>
		<updated>2005-11-10T14:03:40Z</updated>

		<summary type="html">&lt;p&gt;Saturn: Reverted edit of Microbe, changed back to last version by Zyberdog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the display state of the main mIRC window.&lt;br /&gt;
&lt;br /&gt;
 $appstate&lt;br /&gt;
&lt;br /&gt;
* This identifier has no properties or options.&lt;br /&gt;
* Will return one of the following states: &#039;&#039;minimized&#039;&#039;, &#039;&#039;maximized&#039;&#039;, &#039;&#039;normal&#039;&#039;, &#039;&#039;hidden&#039;&#039;, or &#039;&#039;tray&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
The following example will [[beep]] if mIRC is currently &#039;&#039;minimized&#039;&#039; or in the &#039;&#039;tray&#039;&#039;.&lt;br /&gt;
  on *:[[On_text|TEXT]]:[[$()|$(]]* [[DollarPlus|$+]] [[$me]] $+ *):#:{&lt;br /&gt;
    ;Checking $appstate against a list, seperated by spaces (ascii char 32).&lt;br /&gt;
    [[If-Then-Else|if]] ([[$istok]](minimized tray,$appstate,32)) {&lt;br /&gt;
      ;Beep because someone mentioned your nick, and mIRC is &#039;&#039;minimized&#039;&#039; or in the &#039;&#039;tray&#039;&#039;.&lt;br /&gt;
      [[beep]]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
&lt;br /&gt;
[[$appactive]] which can check the basic state of mIRC.&lt;br /&gt;
&lt;br /&gt;
[[Category:Window Identifiers]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$appactive&amp;diff=989</id>
		<title>$appactive</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$appactive&amp;diff=989"/>
		<updated>2005-11-10T14:03:02Z</updated>

		<summary type="html">&lt;p&gt;Saturn: Reverted edit of Microbe, changed back to last version by Zyberdog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns [[$true]] if mIRC is the active application, otherwise it returns [[$false]].&lt;br /&gt;
&lt;br /&gt;
 $appactive&lt;br /&gt;
&lt;br /&gt;
* This identifier has no properties or options.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
This example will [[beep]] if someone mentions your nick in a channel, but only if you are currently looking at another application.&lt;br /&gt;
&lt;br /&gt;
  on *:[[On_text|TEXT]]:[[$()|$(]]* [[DollarPlus|$+]] [[$me]] $+ *):#:{&lt;br /&gt;
    ;Checking if $appactive returns $false by prefixing it with the ! character.&lt;br /&gt;
    [[If-Then-Else|if]] (!$appactive) {&lt;br /&gt;
      ;Beep because someone mentioned your nick, and you don&#039;t have mIRC in focus!&lt;br /&gt;
      [[beep]]&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
[[$appstate]] provides more detailed information about what state mIRC is in.&lt;br /&gt;
&lt;br /&gt;
[[Category:Window Identifiers]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=$len&amp;diff=2492</id>
		<title>$len</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=$len&amp;diff=2492"/>
		<updated>2005-11-10T13:50:11Z</updated>

		<summary type="html">&lt;p&gt;Saturn: small changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Returns the length of a piece of text, i.e. the number of characters in it.&lt;br /&gt;
&lt;br /&gt;
 $len(text)&lt;br /&gt;
&lt;br /&gt;
$len(test string) returns 11.&lt;br /&gt;
&lt;br /&gt;
$len() is a simple, but powerful tool for processing strings.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
This example turns uppercase letters to lowercase and vice-versa.&lt;br /&gt;
&amp;lt;br/&amp;gt;$len is used to get the length of the string (the value given to the alias) and loop through its every character.&lt;br /&gt;
&lt;br /&gt;
 [[Aliases|alias]] changecase {&lt;br /&gt;
   [[var]] %i = 1, %str, %c&lt;br /&gt;
   [[While_loops|while]] (%i &amp;lt;= $len($$1-)) {&lt;br /&gt;
     %c = [[$mid]]($1-, %i, 1)&lt;br /&gt;
     [[If-Then-Else|if]] ([[$isupper]](%c)) {&lt;br /&gt;
       %str = %str [[DollarPlus|$+]] [[$lower]](%c)&lt;br /&gt;
     }&lt;br /&gt;
     [[If-Then-Else|else]] {&lt;br /&gt;
       %str = %str $+ [[$upper]](%c)&lt;br /&gt;
     }&lt;br /&gt;
     [[inc]] %i&lt;br /&gt;
   }&lt;br /&gt;
   [[return]] %str&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 [[echo]] -a $changecase(Hello)&lt;br /&gt;
 ; returns hELLO&lt;br /&gt;
[[Category:Text_and_Number_Identifiers]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=1281</id>
		<title>User:Saturn</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=1281"/>
		<updated>2005-11-08T21:52:13Z</updated>

		<summary type="html">&lt;p&gt;Saturn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Babel-2|nl|en-3}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[Image:Saturn.png]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&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 van Moolenbroek&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;22&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;The Netherlands&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;The eyes of truth are always watching you.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[[Category:Members]][[Category:Quakenet_Staff]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=File:Saturn.png&amp;diff=4217</id>
		<title>File:Saturn.png</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=File:Saturn.png&amp;diff=4217"/>
		<updated>2005-11-08T21:51:35Z</updated>

		<summary type="html">&lt;p&gt;Saturn: Saturn&amp;#039;s avatar&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Saturn&#039;s avatar&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
	<entry>
		<id>https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=881</id>
		<title>User:Saturn</title>
		<link rel="alternate" type="text/html" href="https://script.quakenet.org/wiki/index.php?title=User:Saturn&amp;diff=881"/>
		<updated>2005-11-08T21:47:04Z</updated>

		<summary type="html">&lt;p&gt;Saturn: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Babel-2|nl|en-3}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table border=&amp;quot;0&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;[[Image:Saturn.jpg]]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&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 van Moolenbroek&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;22&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;The Netherlands&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;The eyes of truth are always watching you.&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
[[Category:Members]][[Category:Quakenet_Staff]]&lt;/div&gt;</summary>
		<author><name>Saturn</name></author>
	</entry>
</feed>