Author Topic: Lost add-on: RTB v3.5  (Read 810 times)

I need RTB v3.5 because I need an implementation of the IRC protocol in TorqueScript.
« Last Edit: August 25, 2012, 06:02:43 PM by Axolotl »

https://dl.dropbox.com/u/20459676/System_ReturnToBlockland.zip

Here is some basic IRC implementation that could probably use alot of optimization



Code: [Select]
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);


« Last Edit: August 25, 2012, 06:06:21 PM by Nexus »

https://dl.dropbox.com/u/20459676/System_ReturnToBlockland.zip

Here is some basic IRC implementation that could probably use alot of optimization



Code: [Select]
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);


I made my own implementation.