home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / com / bbs / server / octps074 / script / octopus.scr < prev    next >
Encoding:
Text File  |  1995-09-30  |  4.3 KB  |  183 lines

  1. /*
  2.  * Octopus, The Atari ST(e)/TT/Falcon GEM/TOS Bulletin Board System
  3.  * written by me (Koos Kuil) on FidoNet: 2:282/397, NeST: 90:500/103
  4.  *
  5.  * Example English OctoScript file written on 07 Jun 1994
  6.  *
  7.  * ------------------------------------------------------------------
  8.  * OCTOPUS.SCR   Main programm functions & loop.
  9.  *
  10.  */
  11.  
  12. #include filebase.scr
  13. #include msgbase.scr
  14. #include userinf.scr
  15. #include language.scr
  16. #include ansi.scr
  17. #include userbase.scr
  18.  
  19. /* Main Login function */
  20.  
  21. Main
  22.  
  23. SenseTerminal       /* Detect if remote supports ANSI */
  24. Convert Welcome     /* Send nice Welcome screen */
  25. GetKey
  26. Convert Logon
  27. Gosub login         /* Begin login procedure */
  28.  
  29. /* Check if the user has access to our bulletin board.  When not,
  30.  * (wrong password) it's possible to leave a message to the sysop.
  31.  *
  32.  * If the user doesn't have time left, Octopus will logout him
  33.  * directly after sending a short message.
  34.  */
  35.  
  36. IfNoAccess
  37.    Convert 'NoAccess'
  38.    SetSysopMessageArea
  39.  
  40.    /* Ask the user if he want to leave a message */
  41.  
  42.    Send '\r\nDo you want to leave a message to the SysOp @c2(Y,n)@c0 ? '
  43.    AskYesNo
  44.    IfAskTrue
  45.       Send 'Yes'
  46.       SetMessageSubj 'No access to Octopus'
  47.       SetMessageTo   'Sysop'
  48.       WriteMessage
  49.       Send '\r\n\nThe SysOp will contact you when you are not a FAKE user'
  50.       Send   '\r\nand you will get a new password for this BBS.'
  51.       Send '\r\n\nGreetings,'
  52.       Send   '\r\n          your SysOp'
  53.    Else
  54.       Send 'No'
  55.    Endif
  56.    Send '\r\n\nClick! ...'
  57.    Sleep 2                      /* Wait 2 seconds... */
  58.    Logout                       /* Disconnect user   */
  59. Endif
  60.  
  61. /* Check for a new user */
  62.  
  63. IfNewUser
  64.   Gosub ask_language
  65.   Convert Rules
  66.   Convert BbsInfo
  67. Endif
  68.  
  69. /* Set the user saved language */
  70. Gosub get_language
  71.  
  72. /* Display welcome screen & scan the mail */
  73. Convert FanLogo
  74. DoMailScan Full
  75.  
  76. /* Begin the main loop */
  77.  
  78. :mainmenu
  79. Do
  80.    Convert MainMenu 
  81.    DoChoice
  82.       SelectChoice
  83.          Case A   Gosub allfiles
  84.          Case B   Gosub bulletin
  85.          Case C   Gosub settings
  86.          Case F   Gosub filebase
  87.          Case I   Convert InfoTxt
  88.          Case M   Gosub msgbase
  89.          Case P   Gosub AnsiScreens
  90.          Case Q   Gosub qwkreader
  91.          Case S   Gosub statistics
  92.          Case T   Convert Timedemo
  93.          Case U   UserList
  94.          Case Y   PageSysop
  95.          Case !   Gosub logoff
  96.       EndSelect
  97.    EnddoChoice ''
  98. Enddo ''
  99. End  /* End Octopus */
  100.  
  101. /* User settings */
  102.  
  103. :settings
  104. Do
  105.    Convert Settings 
  106.    DoChoice
  107.      Selectchoice
  108.          Case E   ChangeEmulation
  109.          Case H   Gosub toggle_hotkeys
  110.          Case L   Gosub ask_language
  111.          Case M   Gosub toggle_moreprompt
  112.          Case P   ChangePassword
  113.          Case S   ChangeScreenLength
  114.          Case W   ChangeScreenWidth
  115.          Case F      Gosub toggle_dateformat
  116.          Case U   GetDefaultUp N
  117.          Case D   GetDefaultDown N
  118.          Case A   GetDefaultArchiver N
  119.          Case C   Gosub changeuser
  120.          Case !   Gosub logoff
  121.       EndSelect
  122.    EnddoChoice *
  123. Enddo *
  124. Return
  125.  
  126. /* Tekst bulletins */
  127.  
  128. :bulletin
  129. Do
  130.    Convert Bulletin
  131.    DoChoice
  132.       Selectchoice
  133.          Case 1   Bulletin 'aeo_????.txt'
  134.          Case 2   Bulletin 'slmp???.asc'
  135.          Case 3   Bulletin 'stgd*.txt'
  136.          Case 4   Bulletin 'str???.txt'
  137.          Case 5   Bulletin 'znet*.*'
  138.          Case !   Gosub logoff
  139.       Endselect
  140.    EnddoChoice *
  141. Enddo *
  142. Return
  143.  
  144. /* Several statistics */
  145.  
  146. :statistics
  147. Do
  148.    Convert StatMenu
  149.    DoChoice
  150.       SelectChoice
  151.          Case C   ListLastCallers
  152.          Case D   Convert 15_dnlds
  153.          Case E   Convert 10_email
  154.          Case H   Convert Birthday
  155.          Case M   Convert Status
  156.          Case N   Convert 10_nmail
  157.          Case S   FileBaseStatistics
  158.          Case T   Convert 15_calls
  159.          Case U   Convert 15_uplds
  160.          Case !   Gosub logoff
  161.       EndSelect
  162.    EnddoChoice *
  163. Enddo *
  164. Return
  165.  
  166. /* Logoff function */
  167.  
  168. :logoff
  169. Do
  170.    Convert Logoff
  171.    DoChoice
  172.       SelectChoice
  173.          Case Y    MessageToSysop    Convert Status  Convert FanBye   Logout
  174.          Case N    Convert Status    Convert FanBye    Logout
  175.       EndSelect
  176.    EnddoChoice S   /* Back to main menu */
  177. Enddo S
  178. Return
  179.  
  180. End    
  181.  
  182. /* End OCTOPUS.SCR */
  183.