mIRC Stats — File Browser

mIRCStatsv4.61 / mIRCStatsv4.61 / stats / help / webpage.html

webpage.html — 25.78 KB — Download this file

<html>
<head><title>Introduction</title>

<style type='text/css'>
body { font-size: 10px; font-family: Verdana, Arial, Sans-Serif; color:#000; padding:0px; margin:0px 5px 0px 5px; }
table, td, tr { font-family: Verdana,Arial, Sans-Serif; color:#000; font-size: 10px; }
hr { font-weight: bold; font-size: 8pt; color: #CFD6DF; }

a, a:link, a:visited, a:active  { font-weight:bold;font-size:10px;text-decoration: none; color: #3A4F6C; }
a:hover { font-weight:bold;font-size:10px;text-decoration: underline; color: #3A4F6C; }
a.b { font-weight: bold; font-size: 10px; color: #0066AC; font-family: Verdana,Arial; text-decoration: none }
a.r { font-weight: bold; font-size: 10px; color: #D60000; font-family: Verdana,Arial; text-decoration: none }
a.g { font-weight: bold; font-size: 10px; color: #007070; font-family: Verdana,Arial; text-decoration: none }

#submenu { border:1px solid #BCD0ED;background-color: #DFE6EF;font-size:10px;margin:3px 0px 3px 0px;color:#3A4F6C;font-weight:bold; }
#submenu a { font-weight:bold;font-size:10px;text-decoration: none; color: #3A4F6C; }
.tableborder { border:1px solid #345487;background-color:#FFF; width:100%; }
.cattitle { font-size:10px; font-weight:bold; line-height:150%; background-color:#C4DCF7; color:#000; padding:5px 4px 5px 5px; border-bottom:1px solid #345487; }
.cattitle a { font-weight:bold;font-size:10px;text-decoration: none; color: #3A4F6C; }
.smalltitle { border:1px solid #FFF; font-weight:bold; color:#3A4F6C; line-height: 120%; background-color: #DAE1EA; border-bottom:1px solid #345487; border-left:1px solid #FFF; border-top:1px solid #FFF; border-right:1px solid D1DCEB; }
.smalltitle2 { border:1px solid #FFF; font-weight:bold; color:#3A4F6C; line-height: 120%; background-color: #DAE1EA; border:1px solid #345487; }
.tdrow1 { background-color:#EEF2F7; border-bottom:1px solid #D1DCEB; border-right:1px solid #D1DCEB; border-top:1px solid #FFF; border-left:1px solid #FFF; }
.tdrow2 { background-color:#F5F9FD; border-bottom:1px solid #D1DCEB; border-right:1px solid #D1DCEB; border-top:1px solid #FFF; border-left:1px solid #FFF; }
.tdrow3 { border:1px solid #FFF; font-weight:bold; color:#3A4F6C; background-color: #DAE1EA; border-bottom:1px solid #D1DCEB; border-left:1px solid #FFF; border-top:1px solid #FFF; border-right:1px solid D1DCEB; }
.desc { background-color:#EEF2F7; padding:2px 0px 2px 5px; }
.code { background: #DFE6EF; font-family: tahoma; margin-left: 30; margin-top: 10; margin-right: 10; padding-left: 10; padding-top: 3; padding-bottom: 3; padding-right: 10; width: 100% }

.bar { border-right: #000000 1px solid; border-top: #000000 1px solid; font-size: 8pt; background: #eeeeee; border-left: #000000 1px solid; border-bottom: #000000 1px solid; font-family: tahoma; font-weight: bold }
.hrblue { font-weight: bold; font-size: 8pt; color: #0066AC; }
</style>

<script language='JavaScript'>
<!--
function swap_content(span) {
    displayType=(document.getElementById(span).style.display=='none') ? 'block':'none';
    document.getElementById(span).style.display=displayType;
}
//-->
</script>

</head>

<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#FFFFFF'>
<br><br>
<table width='100%' cellspacing='6' id='submenu'><tr>
<td><a>mIRC Stats</a></td>
<td align='right'><a>Version 4.61</a> &middot; <a>mIRC 6.15</a></td>
</tr></table><br>

<ul>
  <li><a href="#10">The concept</a>
  <li><a href="#11">The .msw file</a>
  <li><a href="#12">Building a basic page</a>
  <li><a href="#13">Multiple pages in one</a>
  <li><a href="#14">Scripting servers information</a>
  <li><a href="#15">Scripting HDD information</a>
  <li><a href="#16">Other usefull tips</a>
</ul>

<div class='tableborder'>
<div class='cattitle'><a name="10" href='#' onclick="swap_content('1'); return false;">The Concept</a></div>
<span id='1' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>
Right, so you're interested in making a mIRC Stats webpage for yourself. In this tutorial like documentation I'm going to explain the basics into doing this, I say basics because virtually anything can be done with it, within the limitations of mIRC and HTML ofcourse..<br><br>
Basicly, a mIRC Stats webpage exists of two files (not counting files such as images). One file, which has the <a>.msw</a> extention, holds some information about the page; it's name, the author, etc.. The other file, which can have any extention you like with <a>exeption</a> of <a>.msw</a>, contains the actual webpage.<br>
The webpage is scripted, meaning it's contained in an alias (which you specify in the <a>.msw</a> file) and you can use all mIRC's commands and identifiers, but ofcourse it's best to stick to what you actually need. The alias is called everytime someone accesses or refreshes the page, so it's important you don't slow it down too much, this can be done by scripting multiple pages so not everything is loaded at once for example.<br><br>
All webpages are stored in the <a>webpage</a> folder inside mIRC Stats' own folder. In there, each webpage has it's own folder, to prevent filename collisions.<br><br>
Note that additional files, such as images, can only be viewed by yourself. This will change in future versions of mIRC Stats.
</table></div>
</span>
</div><br>

<div class='tableborder'>
<div class='cattitle'><a name="11" href='#' onclick="swap_content('2'); return false;">The .msw file</a></div>
<span id='2' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>
This is the file which holds the information about your webpage. It's simply a <a>text file</a>, but with the <a>.msw</a> extention, so it can be listed by mIRC Stats.<br><br>
Each type of information is stored on a seperate line, you're allowed to leave lines blank if you want to, and lines starting with a semicolon (;) will be treated as a comment and thus ignored.<br>
The line starts with a <a>keyword</a>, which specifies what kind of info you're giving, after that comes the information. Note that the items are not case sensetive.<br><br>

Here are the items:
<ul>
  <li><a>Name</a> - This is the name of the webpage.
  <li><a>Author</a> - The name or nickname of the page's author.
  <li><a>Email</a> - E-mail address of the author.
  <li><a>Website</a> - Website for the page or author.
  <li><a>Description</a> - A brief description of the page.
  <li><a>Version</a> - The version of the page. A new version of the same page should always have a value that is greater than (>) the previous version's value.
  <li><a>MSVersion</a> - The version of mIRC Stats the page is created for. This way the user can see if the page is fully supported. Unless big changes are made in mIRC Stats, it will probably still always be loadable, disregarding what version it was made for.
  <li><a>Script</a> - The filename of a mIRC script which contains the alias with the webpage in it.
  <li><a>Alias</a> - This is the alias mIRC Stats must call to show the webpage (<a>NOTE:</a> must <a>not</a> be an existing alias, make it as <a>unique</a> as possible!).
</ul>
For example:<br>
<span class=code>
  <a>Name</a> Example<br>
  <a>Author</a> Voice of Power<br>
  <a>Email</a> marckuiper@hotmail.com<br>
  <a>Website</a> none<br>
  <a>Description</a> This is an example description, blah blah blah.<br>
  <a>Version</a> 1.0<br>
  <a>MSVersion</a> 4.6<br>
  <a>Script</a> example.mrc<br>
  <a>Alias</a> statswebexample
</span>
</table></div>
</span>
</div><br>


<div class='tableborder'>
<div class='cattitle'><a name="12" href='#' onclick="swap_content('3'); return false;">Building a basic page</a></div>
<span id='3' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>

Ok, after creating the 'supportive file', it's time to build the actual webpage. Here's a few basic things you should know:
<ul>
  <li>To make this, you need atleast basic mIRC scripting knowledge.
  <li>Also some HTML knowledge would be helpfull.
  <li>Just like the other, this file too is a simple text file, just as any <a>mIRC script</a> is, this file will be <a>loaded</a> into mIRC's remote section.
  <li>If you intend on actually sending code to the user connecting to the page, use the <a>/sw</a> command, which is explained below.
  <li>Most data (counters and system info) is returned by <a>$sinfo</a>. But some data, such as server info and HDD info, has to be scripted, full examples given below.
  <li>The file can contain additional aliases for you to use, make those <a>local</a> to prevent collision problems. Obviously the main alias should <a>not</a> be local.
  <li>Any of mIRC <a>/aliases</a> and <a>$identifiers</a> can be used.
</ul><br>

Since everything is basicly scripted in mIRC, you cannot just place all HTML in the file, and expect the data to be sent to the user connecting to the page. You will need to use a command for this: <a>/sw</a>. This command stands for mIRC's <a>/sockwrite</a>, and all you need to know about it really is that it sends the data to the user.<br><br>

Let us begin with a simple test, to see how everything works. If you don't know much about scripting, I'd advise you to follow every step I take closely.<br>
The following example would be your script file. As you can see everything's inclosed in the alias provided in the <a>.msw</a> file, and it's a combination of HTML and mIRC scripting. I've provided comments in <a class=g>green</a>.<br><br>

<span class=code>
<a class=g>; the alias</a><br>
<a class=r>alias statswebexample {</a><br>
&nbsp; &nbsp; <a class=g>; this data is sent to the user</a><br>
&nbsp; &nbsp; <a>sw</a> &lt;html&gt;<br>
&nbsp; &nbsp; <a>sw</a> Hello World!<br>
&nbsp; &nbsp; <a>sw</a> &lt;/html&gt;<br>
<a class=r>}</a>
</span><br><br>

If you'd load this as a webpage, and then connect to your ip (ofcourse after using <a>/statsweb</a>), you'd see 'Hello World!'. You've just created the most basic type of webpage possible.<br><br>
Ofcourse we don't intend on keeping it this simple, we want to show statistics, and if possible in a nice looking interface too. So let us add some information using <a>$sinfo</a>:<br><br>

<span class=code>
<a class=r>alias statswebexample {</a><br>
&nbsp; &nbsp; <a>sw</a> &lt;html&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;head&gt;<br>
&nbsp; &nbsp; <a class=g>; this is the title of the webpage. though you don't have to, you can see I've added the window title information<br>
&nbsp; &nbsp; <a class=g>; which you can set in the config dialog, using $sinfo</a><br>
&nbsp; &nbsp; <a class=g>; NOTE: as with all mIRC identifiers, you need to enclose it with </a><a>spaces</a><a class=g>, otherwise everything after it will not be sent<br>
&nbsp; &nbsp; <a>sw</a> &lt;title&gt; Example webpage: <a class=b>$sinfo(p,wintitle)</a> &lt;/title&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;/head&gt;<br><br>

&nbsp; &nbsp; <a>sw</a> &lt;body&gt;<br>
&nbsp; &nbsp; <a class=g>; just like the title, once again don't forget about the spaces, just try it to see what shows up now</a><br>
&nbsp; &nbsp; <a>sw</a> Nickname: <a class=b>$sinfo(p,nick)</a> &lt;br&gt;<br>
&nbsp; &nbsp; <a>sw</a> Full name: <a class=b>$sinfo(p,fullname)</a> &lt;br&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;/body&gt;<br><br>

&nbsp; &nbsp; <a>sw</a> &lt;/html&gt;<br>
<a class=r>}</a>
</span><br><br>

That already looks a lot more interesting doesn't it? All you need to do now practicly is build some kind of table around it and use more of the features of <a>$sinfo</a>, voila!<br>
But again there's more we want, and more we CAN do. For instance you might want to add a box in which you show the time and such. But if you remember correctly, and you do, you can disable that in the config dialog. So you have to live up to that.<br>
I'll no longer include the entire alias, just the part which is significant for the example:<br><br>

<span class=code>
<a class=g>; this code has been directly extracted from the MetaX webpage</a><br>
<a class=g>; as you can see, you can use if statements, this one checks wether to show the time or not</a><br>
<a class=g>; as explained in the documentation for</a> <a>$sinfo</a><a class=g>, showtime returns $true or $false</a><br>
<a class=r>if (</a><a class=b>$sinfo(p,showtime)</a><a class=r>) {</a><br>
&nbsp; &nbsp; <a>sw</a> &lt;table width="300" class="bar"&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td colspan=2&gt;Time:&lt;hr class="hrblue"&gt;&lt;/td&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td width=100&gt;Hour:&lt;/td&gt;&lt;td&gt; <a class=b>$sinfo(t,time)</a> &lt;/td&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td>Date:&lt;/td&gt;&lt;td&gt; <a class=b>$sinfo(t,date)</a> &lt;br&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td>Total online:&lt;/td&gt;&lt;td&gt; <a class=b>$sinfo(t,totalonline)</a> &lt;/td&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td>mIRC uptime:&lt;/td&gt;&lt;td&gt; <a class=b>$sinfo(t,mirc)</a> &lt;/td&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;tr>&lt;td>System uptime:&lt;/td&gt;&lt;td&gt; <a class=b>$sinfo(t,system)</a> &lt;/td>&lt;/tr&gt;<br>
&nbsp; &nbsp; <a>sw</a> &lt;/table&gt;<br>
<a class=r>}</a>
</span><br><br>

This would look something like this:<br><br>
<table><tr><td width=20></td><td>
<table width="300" class="bar">
  <tr><td colspan=2>Time:<hr class=hrblue></td></tr>
  <tr><td width=100>Hour:</td><td> 20:31:48 (+1 GMT) </td></tr>
  <tr><td valign=top>Date:</td><td> Saturday 15/11/2003  <br><br></td></tr>
  <tr><td>Total online:</td><td> 15hrs 20mins 24secs </td></tr>
  <tr><td>mIRC uptime:</td><td> 7hrs 43mins 40secs </td></tr>
  <tr><td>System uptime:</td><td> 8hrs 9mins 35secs </td></tr>
</table><br>
</td></td></table>

The same trick can be pulled for the other parts which can be enabled/disabled.

</table></div>
</span>
</div><br>


<div class='tableborder'>
<div class='cattitle'><a name="13" href='#' onclick="swap_content('4'); return false;">Multiple pages in one</a></div>
<span id='4' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>
Now that you understand the basics of how to make a webpage (I gave only few examples, but you know what you can do with <a>$sinfo</a> now), it is time to explain how to create multiple pages. Because I can understand you may not want everything gathered on a single page.<br><br>
This is where the <a>$1</a> parameter comes in. When mIRC Stats calls for the alias, it will also send some extra data along with it. Which is, as with all mIRC scripting, stored in <a>$1</a>.<br><br>
Say, for example, someone connects to your page. This would mean the url would be something like: <a>http://192.168.0.24:80/</a> (example ip). In this case, <a>$1</a> would be '<a>/</a>'. And as you can see, a '<a>/</a>' is placed after the ip address.<br><br>
Now, you place a link on your page, and you call it something like "<a>/info</a>". In this case, if someone clicks on the link, the url would become <a>http://192.168.0.24:80/info</a>. And <a>$1</a> will be '<a>/info</a>'.<br><br>
If you understand this, you know the rest is very simple, just make an if statement which checks what value <a>$1</a> has. For example:<br><br>

<span class=code>
<a class=r>if (</a><a>$1</a> <a class=r>==</a> <a>/info</a><a class=r>) {</a><br>
&nbsp; &nbsp; <a>sw</a> This is where all kind of information goes.<br>
<a class=r>}</a><br>
<a class=r>elseif (</a><a>/blah*</a> <a class=r>iswm</a> <a>$1</a><a class=r>) {</a><br>
&nbsp; &nbsp; <a>sw</a> Different info is stored here.<br>
<a class=r>}</a><br>
<a class=r>else {</a><br>
&nbsp; &nbsp; <a>sw</a> This would be displayed when the user first connects to the page.<br>
<a class=r>}</a>
</span><br><br>

This way you can prevent from loading times being too long, or a page getting simply too big. Plus it adds more interactivity to it all.<br><br>
Ofcourse with this you can fake filenames, such as <a>.php</a>. And you can also make stuff like <a>/file.php?id=172&view=1</a> for example, whatever you want..
</table></div>
</span>
</div><br>


<div class='tableborder'>
<div class='cattitle'><a name="14" href='#' onclick="swap_content('5'); return false;">Scripting servers information</a></div>
<span id='5' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>
This is the most difficult part of the webpage, and a higher knowledge of mIRC scripting is needed for this. The case is, it's not practical to let this data be returned by <a>$sinfo</a>, or any other home made alias.<br><br>
There's multiple ways for displaying all of the data for the server; all at once, a list of servers and when selected new lists of channels and query's (and their data) emerges, and probably more...<br><br>
Since it's would be a bit boring for me to cough up everything you'd need to do to script all of this, I will just keep it a bit more basic. To begin with, a way to list the servers (in a table for instance), which is easy enough:<br><br>

<span class=code>
<a class=g>; once again extracted from the MetaX webpage</a><br>
<a>sw</a> &lt;table width="96%" class="bar"&gt;<br>
<a class=g>; the header of the table</a><br>
<a>sw</a> &lt;tr&gt;&lt;td&gt;Server&lt;hr&gt;&lt;/td&gt;&lt;td&gt;Network&lt;hr&gt;&lt;/td&gt;&lt;td&gt;Nick&lt;hr&gt;&lt;/td&gt;&lt;td&gt;Chans&lt;hr&gt;&lt;/td&gt;&lt;td&gt;Query's&lt;hr&gt;&lt;/td&gt;&lt;td&gt;More Info&lt;hr&gt;&lt;/td&gt;&lt;/tr&gt;<br>
<a class=g>; this will check if you're connected at all, and if you're disconnected it will display that in the table</a><br>
<a class=r>if (</a><a>$scon(1).status</a> <a class=r>==</a> <a>disconnected</a><a class=r>) {</a> <a>sw</a> &lt;tr&gt;&lt;td&gt;Not connected&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;td&gt;-&lt;/td&gt;&lt;/td&gt; <a class=r>}</a><br>
&nbsp;<a class=g>; a few local variables for the while loop</a><br>
&nbsp;<a>var %s1</a> = <a>$scon(0)</a>,<a>%s2</a> = 1<br>
&nbsp;<a class=g>; while loop which will loop through all connections</a><br>
&nbsp;<a class=r>while (</a><a>%s2</a> <a class=r>&lt;=</a> <a>%s1</a><a class=r>) {</a><br>
&nbsp; &nbsp;<a class=g>; checks if you're connected to the Nth server</a><br>
&nbsp; &nbsp;<a class=r>if (</a><a>$scon(%s2).status</a> <a class=r>==</a> <a>connected</a><a class=r>) {</a><br>
&nbsp;&nbsp;&nbsp; &nbsp; <a class=g>; changes the active connection for the script (in other words identifiers and such will work for the Nth server)</a><br>
&nbsp; &nbsp;&nbsp; &nbsp; <a>scon %s2</a><br>
&nbsp;&nbsp;&nbsp; &nbsp; <a class=g>; will add various informations about the server, such as it's url, the network, your nick..</a><br>
&nbsp; &nbsp;&nbsp; &nbsp; <a>sw</a> &lt;tr&gt;&lt;td&gt;&lt;a href="irc:// <a>$+ $server $+</a> /"&gt; <a>$server</a> &lt;/a&gt;&lt;/td&gt;&lt;td&gt; <a class=r>$iif(</a><a>$network</a><a class=r>,</a><a>$ifmatch</a><class=r>,</a>unknown<a class=r>)</a> &lt;/td&gt;&lt;td&gt; <a>$me</a> &lt;/td&gt;&lt;td&gt; <a>$chan(0)</a> &lt;/td&gt;&lt;td&gt; <a>$query(0)</a> &lt;/td&gt;&lt;td&gt;&lt;a href="/servers/?id= <a>$+ %s2 $+</a> ">Click!&lt;/a&gt;&lt;/tr&gt;<br>
&nbsp; &nbsp;<a class=r>}</a><br>
&nbsp; &nbsp;<a>inc %s2</a> 1<br>
<a class=r>}</a><br>
<a>sw</a> &lt;/table&gt;&lt;hr&gt;
</span><br><br>

This might look very complicated, but just paste it into your webpage and you'll see it's just a very long line (because of all the table cells and all).<br>
As you can see I've used identifiers such as <a>$scon</a>, <a>$chan</a> and <a>$query</a> to retrieve some information about the servers. And <a>/scon</a> to switch through the servers. See mIRC's help file for a more detailed documentation for them.<br><br>

You've probably already seen how the webpages work. If so, you know you have to click the 'Click!' link to get more info about the selected server and a list of the open channels and query's. When clicking it you are linked to an url with the id of the server in it, so you can list various stuff for that connection, such as server information (but also anything you want..).<br><br>

I will not provide any extensive examples here, as you can see how everything works in one of the webpages. But I will give a list on what identifiers you can use in order to list the info:
<ul>
  <li><a>$server</a> - the server address
  <li><a>$network</a> - the network the server is connected to
  <li><a>$port</a> - the port you're connected to
  <li><a>$serverip</a> - the ip of the server
  <li><a>$me</a> - your nickname
  <li><a>$usermode</a> - your current usermode(s)
  <li><a>$uptime(server,1)</a> - how long you've been connected to the server
  <li><a>$duration($idle)</a> - how long you've been idle
  <li><a>$away</a> - if you're away - $true or $false
  <li><a>$chantypes</a> - channel types the server supports
  <li><a>$chanmodes</a> - channel modes the server supports
  <li><a>$prefix</a> - mode prefixes the server supports
  <li><a>$modespl</a> - maximum number of parameters allowed per /mode
</ul>
See the mIRC help file for more detailed descriptions.<br><br>

For the channel information, you can use <a>$chan(0)</a> to loop them, and the <a>$nick</a> and <a>$chan</a> identifiers to retrieve information about them. See mIRC's help file or other webpages for more info.<br><br>
For the query information, you can use <a>$query(0)</a> to loop them, and the <a>$query</a> and <a>$comchan</a> identifiers to retrieve information about them. Again see mIRC's help file or the other webpages.<br><br>
Just fool around with it a bit, and use the <a>$1</a> parameter wisely. You'll see it isn't that hard to figure out.
</table></div>
</span>
</div><br>



<div class='tableborder'>
<div class='cattitle'><a name="15" href='#' onclick="swap_content('6'); return false;">Scripting HDD information</a></div>
<span id='6' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>
There is one more part that will need to be fully scripted, and that's the HDD information. Again a while loop is needed, and the <a>$disk</a> identifier is used to retrieve the information.<br>
I wont provide a full example of how you can handle everything along with the total size (you'll have to store the information somehow then), instead I'll give the easiest way of getting some information about then. The rest can be seen in the other webpages.<br><br>

<span class=code>
<a class=g>; the loop will start at ascii character 67, which is C. and it will go on till 90, which is Z</a><br>
<a>var %l</a> = 67<br>
<a class=r>while (</a><a>%l</a> <a class=r>&lt;=</a> 90<a class=r>) {</a><br>
&nbsp; &nbsp; <a class=g>; checks if the disk exists, using </a><a>$chr</a><br>
&nbsp; &nbsp; <a class=r>if (</a><a>$disk($chr(%l))</a><a class=r>) {</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; setting the free space to %f, and the size to %s, since those a used often in the next line</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>var %f</a> = <a>$disk($chr(%l)).free</a>,<a>%s</a> = <a>$disk($chr(%l)).size</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the disk's symbol and label (C: (SYSTEM))</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $chr(%l) $+</a> : ( <a>$+ $iif($disk($chr(%l)).label,$disk($chr(%l)).label,No label) $+</a> )<br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the type of the disk (fixed, cdrom, removable, remote)</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $disk($chr(%l)).type</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the full size of the disk</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $bytes(%s,3).suf</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the ammount of space used</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $bytes($calc(%s - %f),3).suf</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the ammount of space left</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $bytes(%f,3).suf</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a class=g>; the ammount of space left, in a percentage</a><br>
&nbsp; &nbsp; &nbsp; &nbsp; <a>sw $round($calc((%f / %s)*100),1) $+ %</a><br>
&nbsp; &nbsp; <a class=r>}</a><br>
&nbsp; &nbsp; <a>inc %l</a><br>
<a class=r>}</a>
</span>
</table></div>
</span>
</div><br>


<div class='tableborder'>
<div class='cattitle'><a name="16" href='#' onclick="swap_content('7'); return false;">Other usefull tips</a></div>
<span id='7' style='display: block'>
<table width='100%' cellspacing='0' cellpadding='5' align='center' border='0'><tr class='desc'><td>

Here are some things you should note when making a webpage, or just some handy tips:
<ul>
  <li>Never use <a>/halt</a>, it will screw up. Use <a>/return</a> instead if you really want to stop displaying of the page.
  <li>Also, do not close the socket yourself, let mIRC Stats do that for you.
  <li>A webpage should not contain the mIRC <a>on LOAD</a> and <a>on UNLOAD</a> events. There is no need.
  <li>Try not to make too large pages, you will experience lag everytime someone refreshes your page then.
  <li>Additional files, such as images, can only be viewed by you for now. You will have to use their full path to show them. If you want others to see them, they must be online somewhere.
  <li>Try to live up to the showing or not of various aspects of the page. So if someone disables the showing of the system stats, it's not displayed anyway.
  <li>You can show how long it took to generate the page by putting at the beginning: <a>var %ticks = $ticks</a>, and at the end: <a>$calc(($ticks - %ticks) /1000) secs</a>.
  <li>You can use any mIRC alias you like, try to experiment.
  <li>You can also put additional aliases in the file, but make those <a>local</a> to prevent problems.
  <li>The main alias in <a>not</a> local.
</ul>

If you feel like something is missing, or something isn't explained well enough, just contact me about it and I will look into it.

</table></div>
</span>
</div><br>

</body>
</html>