My Ruby IRC bot doesn't connect to the IRC server. What am I doing wrong?
问题 require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC Bot" channel = "#0x40" s = TCPSocket.open(server, port) s.print("USER Testing", 0) s.print("NICK #{nick}", 0) s.print("JOIN #{channel}", 0) This IRC bot doesn't connect to the IRC server, What am I doing wrong? 回答1: It failed with this message: :irc.shakeababy.net 461 * USER :Not enough parameters so change your code. For example, this one works: require "socket" server = "irc.rizon.net" port = "6667" nick = "Ruby IRC