The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# $File: //depot/OurNet-BBSAgent/BBSAgent/twserv.bbs $ $Author: autrijus $
# $Revision: #4 $ $Change: 2829 $ $DateTime: 2002/01/10 14:54:36 $
# Contributed by Chia-liang Kao <clkao@clkao.org>
# zh_TW.Big5: ¥xÆW¤å¤Æ¸ê°T¯¸

TWServ
tw.twbbs.org

setv headansi 1;32;40m
setv headansiend 33m

=login
wait ±b¸¹¡G
send $[username]\n$[password]\n\n\n\n
goto main

=main
send \e[D\e[D\e[D\e[D\e[D\e[D
wait ¥D¥\¯àªí
till Call¾÷

=message
wait [1;33;46m\xa1\xb9
till \x1b\x5b37;45m\x20
till \x20\x1b\x5b\x6d
exit

=message_reply
send \x12
wait ¤ô²y¥á¹L¥h
send $[message]\n
wait [Y/n]?
send \n
wait \x20\x1b\x5b\x6d
exit

=message_send
call talk_users
send /
wait ¥N¸¹¡G
send $[receiver]\nw
wait ]:
send $[message]\n
wait [Y/n]?
send \n
wait \e[m
exit

=talk
call main
send t\n
wait ²á¤Ñ»¡¸Ü
till ¦©¾÷

=talk_users
call talk
send u\n
wait ¨Ï¥ÎªÌ¦Cªí
till ¨Ï¥ÎªÌ¦Cªí

=logoff
call main
send g\ng\n\n\n\n


# bad

=mail
call main
send m\n
wait ¹q¤l¶l¥ó
till Call¾÷

=mail_send
call mail
send s\n
wait ¥N¸¹¡G
send $[receiver]\n
wait ¥DÃD¡G
send $[subject]\n
wait ½s¿è¤å³¹
send $[content]\x18
wait Àɮ׳B²z
send s\n\n
wait ©³½Z
doif $[savelocal]
    send \n
else
    send n\n
endo
send \n

=board
send s
wait ¦WºÙ
send $[board]\n\x20\nq\n
wait ªO¥D¡G
till ¤å³¹¿ïŪ

=board_list_last
call board $[board]
send 1\n\x24
wait ¡´
till /
exit

=board_article_select
call board $[board]
send $[article]\n\nq\n
wait ¡´
till ¤å³¹¿ïŪ
exit

=board_article_desc
send q\n
wait ¡´
till ¤å³¹¿ïŪ
exit

=board_article_fetch_first
call board $[board]
send $[article]\n\n
#send \n
till m/\e\[([\d;]+)m\x20\x20ÂsÄý\x20P./
  or \x07
doif $[2]
    call die
endo
wait (
till )
wait \e[30mµ²§ô\x20\x20\x20\x20\x20\e[0m
exit

=board_article_fetch_next
send \x20
till m/\e\[([\d;]+)m\x20\x20ÂsÄý\x20P./
wait (
till )
wait \e[30mµ²§ô\x20\x20\x20\x20\x20\e[0m
exit

=board_article_fetch_last
send qq
wait ¤å³¹¿ïŪ
exit

=article_post_raw
call board $[board]
send \x10$[title]\n0\n$[body]\x18\n\n
doif $[author]
    call article_edit_author $[author]
endo
exit

=article_edit_author
send \x24E\x19\x19\x19\x19\x14\x19\x19\x19\x18\nT\n\x01\x0b$[author]\n\ny\n
wait ¤å³¹¿ïŪ
exit

=chat_enter
call talk
send c\n\n
wait ¡÷

=chat_room
send /j $[room]\n
wait [$[room]]
exit

=chat_say
send $[message]\n
wait $[message]
exit

=chat_listen
wait ;1H
till :\x20
  or *\x20
till \e[
exit

=chat_leave
send /bye\n
wait [C]
send c\n
goto main

=chat_message_send
send /m $[caller] $[message]\n
wait $[message]
exit

=send_enter
send \n
exit