socket = require("socket")-- Connect to IRC, make sure the nick is free, give IRC our credentialsprint("Connecting to IRC...")socket = socket.connect("irc.ascentemu.com",6667)-- socket:send("PRIVMSG NickServ :ghost CDC panstarefun\n") This was just to ghost nicks using ourssocket:send("NICK LuaBotTest\n")socket:send("USER CDC bogus. this.is.ignored :CDC\n")-- [[ Display all the crap IRC sends back; we're looking for the PING and for the moment to ID the nick. When we find the PING we PONG back. A debugging line allows us to see what commands we're getting from the IRC server. ]]--repeat feedback = socket:receive("*l") print(feedback) cmd = parseline(feedback)-- printtable(cmd) if (cmd["command"] == "PING") then print("Found PING!!!") socket:send("PONG "..cmd[1].."\n") end--[[ until ( feedback == ":NickServ!services@services.slashnet.org NOTICE CDC :If you do not change your nickname within one minute, it will be changed automatically.") --]]-- End of the intro crap, we now deliver the nick ID commandprint("Sending IDENTIFY command.")-- socket:send("PRIVMSG NickServ :IDENTIFY pantsarefun\n") Not registered nick yetfeedback = socket:receive("*l")print(feedback)-- We're now connected, and enter #cdc on command-- io.input()print("Connected. Ready to join the channel")x = io.read("*l")print(x)socket:send("JOIN #moon++\n")