[Solved] Irc client help
Posted: Mon Dec 30, 2013 2:43 am
I have been trying to make an irc client with love2d as a fun project of mine, and it works... well sorta.
It connects to the irc server absolutely fine, but it receives nothing!
Updated summary of the code:
Summary of log:
I'm dumbfounded as to why it isn't working, please help?
EDIT: Oh, what do you know! changed the port to 8000 and it worked!
It connects to the irc server absolutely fine, but it receives nothing!
Updated summary of the code:
Code: Select all
local username = "USERNAME"
local nickname = "Username"
local ip = "irc.freenode.net"
local port = "6667"
local channel = "#(ARealWorkingChannel)"
local irc = socket.tcp()
print(irc:connect(ip,tonumber(port)))
irc:settimeout(1)
irc:send("USER "..username.." 8 * :"..username.."\r\n")
irc:send("NICK "..nickname.."\r\n")
irc:send("JOIN "..channel.."\r\n")
--to help get a better understanding of how irc works:
function love.update(dt)
print(irc:receive())
end
Code: Select all
Running client!
0 timeout
nil timeout
nil closed
nil closed
nil closed
Etc.
EDIT: Oh, what do you know! changed the port to 8000 and it worked!