From: ts Date: 2003-07-04T23:55:41+09:00 Subject: Re: Stuck with Telnet still >>>>> "k" == kingsley writes: k> Hmm that doesnt work, I have to keep my finger on the return key to see k> the server repsonse and it all comes out in a 1 character wide space - k> each time I hit return it shows me another character. k> I\'m on a windows platform - did this code work for you ? svg% cat b.rb #!/usr/bin/ruby require 'socket' require 'thread' sock = TCPSocket.new('ancient.anguish.org',2222) $stdout.sync = true t1 = Thread.new do while line = gets sock.puts line break if /^quit/ =~ line end end t2 = Thread.new do loop do ch = sock.recv(1) putc ch end end t1.join svg% svg% b.rb <\ ____________________________________>\ _ Welcome to... <___________________________________< >ZZZZZZZ(_) >/ /| /| ______________________________________> (Native Mode) )( \/ A Realtime Multiuser Adventure Game This world is Pueblo 1.0 enhanced. Use Guest if you just want to look around. What is your name: guest You are now Guest. Welcome back to YOUR /\_ncient /\_nguish --== Founders: Zor, Drake ==-- --== Archwizards: Adinos, Arpeggio, Malire, Oakram, Paldin, Scarecrazy ==-- --== Senators: Buxley, Bytre, Dale, Dawg, Florin, Idul, Jerusulum ==-- ** The donation drive is active! "help donations" for information. [...] See 'help contest' and 'help contest.faq' Your last login was from random places. Welcome to AA! Your last login was 461 weeks, 1 day, 20 minutes and 10 seconds ago. Baron Kilor the Knight Commander of the Realm (nice). A gigantic trained dog. Kerrick the Grand Knight and Protector of the Rose (neutral). Dreaming the Treacherous Right Claw of the Black Bear (good). A stone statue of Visitor. A player usage graph hanging on the wall. > Kerrick says: nur klein genug muss er sein Kilor leaves south. help quit command : quit argument: none Typing 'quit' will immediately quit the game. You will drop all items you are currently carrying. All of your statistics (including gold on-hand and in the bank, abilities, class, and guild association) are saved, and will be restored the next time you enter Ancient Anguish. You will not start where you quit, but will be returned to the village of Tantallon. See also: save > Dreaming asks: gibts auch gigantic wolves? > quitMissliz enters the game. svg% k> The only change I see was that you regex for quit - and break on that. k> Which doesn\'t k> help much unfortunately I've added $stdout.sync = true Guy Decoux