How to put a simple def h "Hello World!" thing but also putting the below script also

require “socket”
server = “irc.cjmz.eu”
port = “6667”
nick = “ANONYMOUS”
channel = “#cjmz-irc, #[IF]”
s = TCPSocket.open(server, port)
print(“addr: “, s.addr.join(”:”), “\n”)
print(“peer: “, s.peeraddr.join(”:”), “\n”)
s.puts “USER ANON 0 * ANON”
s.puts “NICK #{nick}”
s.puts “JOIN #{channel}”
s.puts “PRIVMSG #{channel} :Hello from IRB Bot\n”)

until s.eof? do
msg = s.gets
puts msg
end

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs