require "socket" SERVER = "iiiypuk.me" PORT = 6667 NICK = "irc-cr" USER = "Axel" puts "Running..." irc = TCPSocket.new(SERVER, PORT) irc << "USER #{NICK} . . :This is a bot!\n" irc << "NICK #{NICK}\r\n" irc << "PRIVMSG #{USER} :!time\r\n" while response = irc.gets if response.to_s.includes?("PING") irc << "PONG #{response.to_s.split[1]}\r\n" end end irc << "QUIT\r\n" irc.close