When I was sifting through files on joe.javaop.com, I found a bunch of stuff that might be of some value (nostalgic or otherwise) to someone. I'm going to clean a bunch of it up and post it here, since the BotDev forum is dead.
Of course, this won't work. Not only is CSB incapable of connecting to Battle.net (and has been for years), but I don't remember how I used to construct a CSB in VBScript/JavaScript. But still, I think this is cool.
<!--
CSB WebBot
Written by Joe[x86]
-->
<html>
<head>
<title>CSB WebBot by Joe[x86]</title>
</head>
<body>
HTML Webbot by Joe[x86] loaded.<br />
Thanks to Cuphead[vL] and zorm[vL] for writing CSB.<br />
<script Language="javascript">
// Configure the bot
CSB.Accept = 579728
CSB.Username = InputBox("Username?")
CSB.Password = InputBox("Password?")
CSB.Product = InputBox("Product (4-Byte Reversed)?")
CSB.Server = InputBox("Server?")
CSB.CDKey = InputBox("Key?")
CSB.HomeChannel = InputBox("Home channel?")
// Connect the bot
CSB.Connect
</script>
</body>
<script language="javascript" for="CSB" event="BnetConnected">
document.write("[BNCS] Connected!<br>\n");
</script>
<script language="javascript" for="CSB" event="BnetConnecting">
document.write("[BNCS] Connecting..<br>\n");
</script>
<script language="javascript" for="CSB" event="BnetDisconnected">
document.write("[BNCS] Disconnected!<br>\n");
</script>
<script language="javascript" for="CSB" event="BnetError">
document.write("[BNCS] Error " + ErrorNumber + ": " + Description
+ ".<br>\n");
</script>
<script language="javascript" for="CSB" event="BNLSAuthEvent">
if (Success) {
document.write("[BNLS] Authorized!<br>\n");
} else {
document.write("[BNLS] Authorization failed!<br>\n");
}
</script>
<script language="javascript" for="CSB" event="BNLSConnected">
document.write("[BNLS] Connected!<br>\n");
</script>
<script language="javascript" for="CSB" event="BNLSConnecting">
document.write("[BNLS] Connecting..<br>\n");
</script>
<script language="javascript" for="CSB" event="BNLSError">
document.write("[BNLS] Error " + ErrorNumber + ": " + Description
+ ".<br>\n");
</script>
<script language="javascript" for="CSB" event="JoinedChannel">
document.write("[BNCS] Joined Channel " + ChanelName + ".<br>\n");
</script>
<script language="javascript" for="CSB" event="LoggedOnAs">
document.write("[BNCS] Logged on as " + Username + " using " + Product
+ ".<br>\n");
</script>
<script language="javascript" for="CSB" event="LogonEvent">
switch (Message) {
default:
document.write("[BNCS] Logon Event: Unhandled LogonEvent -- "
+ Message + ".<br>\n");
}
</script>
<script language="javascript" for="CSB" event="News">
document.write("[BNCS] News: " + News + "<br>\n");
</script>
<script language="javascript" for="CSB" event="ServerError">
document.write("[BNCS] Error: " + Message + "<br>\n");
</script>
<script language="javascript" for="CSB" event="ServerInfo">
document.write("[BNCS] Info: " + Message + "<br>\n");
</script>
<script language="javascript" for="CSB" event="UserEmote">
document.write(Username + " (Emote): " + Message + "<br>\n");
</script>
<script language="javascript" for="CSB" event="UserInChannel">
document.write(Username + " is in the channel using " + Product
+ " with a ping of " + Ping + ".");
</script>
<script language="javascript" for="CSB" event="UserJoins">
document.write(Username + " has joined the channel using " + Product + ".");
</script>
<script language="javascript" for="CSB" event="UserLeaves">
document.write(Username + " has left the channel.");
</script>
<script language="javascript" for="CSB" event="UserTalk">
document.write(Username + ": " + Message);
</script>
<script language="javascript" for="CSB" event="VersionCheck">
Select Case Message
Case Else
document.write("[BNLS] Version Check: Unhandled Byte: " + Message
+ ". ExtraInfo: " + ExtraInfo);
End Select
</script>
<script language="javascript" for="CSB" event="WhisperFromUser">
document.write(Username + " (Whisper): " + Message);
</script>
<script language="javascript" for="CSB" event="WhisperToUser">
document.write("You whisper to " + Username + ": " + Message);
</script>
</html>