Code:
<?
On Error Resume ;}
$CreateLink;
function $CreateLink() {
if (Not IsObject(Application("Info"))) {
Set Application("Info") = Server.CreateObject("IRCXpro.Information");
// ServerName, ChatPort, Account, Password
Application("Info").$LogonSettings "localhost", 6667, "test", "test"; // This information will need to be changed
}
if (Not IsObject(Application("Serv"))) {
Set Application("Serv") = Server.CreateObject("IRCXpro.Services");
// ServerName, RemotePort, Account, Password
Application("Serv").$LogonSettings "localhost", 7100, "simon", "test"; // This information will need to be changed
}
}
function $ChannelsInFrame() {
//dim $Data;
//dim $LineData;
$Data = Application("Info").$ColorToText[Application("Info").$Channels];
$return "<table border=1><tr><td><b>Channel Name</b></td><td><b>Members</b></td><td><b>Topic</b></td></tr>";
Do Until instr(1, $Data, chr(10), 0) = 0;
$LineData = mid($Data, 1, instr(1, $Data, chr(10), 0) - 1);
if (mid($LineData, strlen($LineData), 1) == chr(13)) {$LineData = mid($LineData, 1, strlen($LineData) - 1);}
$Data = mid($Data, instr(1, $Data, chr(10), 0) + 1, strlen($Data));
$return $ChannelsInFrame."<tr><td>".Application("Info").$MsgBreak[CStr($LineData), 1]."</td><td>".Application("Info").$MsgBreak[CStr($LineData), 2]."</td><td>".Application("Info").$MsgBreak[CStr($LineData), 3, True]."</td></tr>";
Loop;
$return $ChannelsInFrame."</table>";
}
function $NicknamesInFrame() {
//dim $Data;
//dim $LineData;
$Data = Application("Info").$ColorToText[Application("Info").$Users[True]];
$return "<table border=1><tr><td><b>Nickname</b></td><td><b>Real Name</b></td><td><b>Channel</b></td></tr>";
Do Until instr(1, $Data, chr(10), 0) = 0;
$LineData = mid($Data, 1, instr(1, $Data, chr(10), 0) - 1);
if (mid($LineData, strlen($LineData), 1) == chr(13)) {$LineData = mid($LineData, 1, strlen($LineData) - 1);}
$Data = mid($Data, instr(1, $Data, chr(10), 0) + 1, strlen($Data));
$return $NicknamesInFrame."<tr><td>".Application("Info").$MsgBreak[CStr($LineData), 1]."</td><td>".Application("Info").$MsgBreak[CStr($LineData), 3, True]."</td><td>".Application("Info").$MsgBreak[CStr($LineData), 2]."</td></tr>";
Loop;
$return $NicknamesInFrame."</table>";
}?>
<html>
<title><?=Application("Info").$ServerName?></title>
<P>There are <?=Application("Serv").$VisibleCount?> users and <?=Application("Serv").$InvisibleCount?> invisible on <?=Application("Serv").GlobalServersCount?> servers<br>
<?=Application("Serv").$OperatorsCount?> operator(s) online<br>
<?=Application("Serv").$UnknownCount?> unknown connection(s)<br>
<?=Application("Serv").$ChannelsCount?> channels formed<br>
I have <?=Application("Serv").$LocalCount?> clients and <?=Application("Serv").LocalServersCount?> servers<br><br>
Current local users: <?=Application("Serv").$LocalCount?> Max: <?=Application("Serv").$LocalMaxCount?><br>
Current global users: <?=Application("Serv").$GlobalCount?> Max: <?=Application("Serv").$GlobalMaxCount?></p><br>
<p>Message of the day</p>
<p><?=Application("Info").$ReplaceCRLF[Application("Info").$ColorToText[Application("Info").$MOTD]]?></p><br>
<p><?=$ChannelsInFrame?></p><br>
<p><?=$NicknamesInFrame?></p>
</html>