Blockland Forums > Suggestions & Requests
Lost add-on: RTB v3.5
Pages: (1/1)
Axolotl:
I need RTB v3.5 because I need an implementation of the IRC protocol in TorqueScript.
Nexus:
https://dl.dropbox.com/u/20459676/System_ReturnToBlockland.zip
Here is some basic IRC implementation that could probably use alot of optimization
--- Code: ---function irc::onDNSFailed(%this)
{
echo("DNS Failed");
}
function irc::onConnected(%this)
{
echo("Connected");
%this.sendline("NICK Blockhead-"@getnumkeyid()@"\r\n");
%this.sendline("USER Blockhead-"@getnumkeyid()@" 0 * :Pete-"@getnumkeyid()@"\r\n");
}
function irc::onConnectFailed(%this)
{
echo("Connection Failed");
}
function irc::onDisconnect(%this)
{
echo("Disconnected");
}
function irc::onLine(%this, %line)
{
echo("TCP: " @ %line);
if(getword(%line, 0) $= "PING")
%this.sendline("PONG" SPC getword(%line, 1) @ "\r\n");
else if(strpos(%line, "End of \MOTD Command.") > -1)
%this.sendline("ISON Blockhead"@getnumkeyid()@"\r\n");
else if(strpos(%line, ":+iwx") > -1)
%this.sendline("NAMES\r\n");
else if(strpos(%line, "376") > -1)
{
%this.sendline("JOIN #NexusServer\r\n");
%this.sendline("PRIVMSG Nickserv Identify Nexus password");
}
}
function irc::sendline(%this, %line)
{
echo("OUT: "@ %line);
%this.send(%line);
}
function irc_Default()
{
irc.connect("irc.centralchat.net:6667");
}
if(isobject(irc))
return;
new tcpobject(irc);
--- End code ---
Axolotl:
--- Quote from: Nexus on August 25, 2012, 06:03:31 PM ---https://dl.dropbox.com/u/20459676/System_ReturnToBlockland.zip
Here is some basic IRC implementation that could probably use alot of optimization
--- Code: ---function irc::onDNSFailed(%this)
{
echo("DNS Failed");
}
function irc::onConnected(%this)
{
echo("Connected");
%this.sendline("NICK Blockhead-"@getnumkeyid()@"\r\n");
%this.sendline("USER Blockhead-"@getnumkeyid()@" 0 * :Pete-"@getnumkeyid()@"\r\n");
}
function irc::onConnectFailed(%this)
{
echo("Connection Failed");
}
function irc::onDisconnect(%this)
{
echo("Disconnected");
}
function irc::onLine(%this, %line)
{
echo("TCP: " @ %line);
if(getword(%line, 0) $= "PING")
%this.sendline("PONG" SPC getword(%line, 1) @ "\r\n");
else if(strpos(%line, "End of \MOTD Command.") > -1)
%this.sendline("ISON Blockhead"@getnumkeyid()@"\r\n");
else if(strpos(%line, ":+iwx") > -1)
%this.sendline("NAMES\r\n");
else if(strpos(%line, "376") > -1)
{
%this.sendline("JOIN #NexusServer\r\n");
%this.sendline("PRIVMSG Nickserv Identify Nexus password");
}
}
function irc::sendline(%this, %line)
{
echo("OUT: "@ %line);
%this.send(%line);
}
function irc_Default()
{
irc.connect("irc.centralchat.net:6667");
}
if(isobject(irc))
return;
new tcpobject(irc);
--- End code ---
--- End quote ---
I made my own implementation.
Pages: (1/1)