Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'socket'
- s=TCPSocket.new(*ARGV[0..1])
- s.puts "USER A B C D", "NICK waffles"
- while !s.eof?
- s.puts case s.gets
- when /^\S+ 001 .+/
- "JOIN #{ARGV[2]}"
- when /.+ :-quit( .+)?/
- "QUIT :#{$1}"
- when /.+ (.+) :-(.+)$/
- "PRIVMSG #{$1} :#{$2}"
- when /PING (.+)/
- "PONG #{$1}"
- end
- end
Add Comment
Please, Sign In to add comment