出沢です
>折角なので、lib のは汎用性が高いとうれしいと思った次第。
などとかっこいい事をいいながら、nif.rb をもとに asahi.rb などという
似て非なるものを作り始めている、、、
おかしな挙動が、、、、
cmd ですが、
@asahi.waitfor(/UserID: *$/){|c| print c }
@asahi.cmd({"String" => @my_id,
"Match" => /Password: *$/}){|c| print c }
@asahi.cmd({"String" =>options['password'],
"Match" => /=== top> */}){|c| print c }
の部分は、UserID:、 Password を検出してすぐ次の処理に移るのですが、
これにつづいて get_all を実行したり、その後に logout を実行すると
def get_all()
begin
@asahi.cmd({"String" => "all",
"Match" => /=== conf> *$/}){|c| print c }
def logout
begin
@asahi.cmd("bye"){|c| print c }
-------------
=== top>
=== top> all
... 対象となるメールはありません。
... 未読(新着)メッセージがある会議・掲示板はありません。
=== conf>
... 未読(新着)メッセージがある会議・掲示板はありません。
=== conf> bye
-------------------
この様に、top conf を2度待ちます。
症状としては、最初の top、conf のあとに、\n を送った様に
思われます。
telnet.cmd を覗いて見たのですが、らしきところもなし、、、
ヒントください。