#!/usr/bin/ruby # # simpleclient.rb # require 'socket' client = TCPSocket.new('mush.pennmush.org',4201) client.puts "connect bombur rubybot" while line = client.readline line.chomp! # Get rid of trailing \r\n case line when /(.*) waves to bombur/ client.puts "pose waves to #{$1}" when /bots are cool/ client.puts "say yes they are" end end