require "irc"
local s = irc.new{nick = "example"}
s:hook("OnChat", function(user, channel, message)
print(("[%s] %s: %s"):format(channel, user.nick, message))
end)
s:connect(--[[ link or link, port or ip, port ]])
s:join("#example") -- channel name
-- в main
while true do wait(0)
s:think()
end