home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 September / PCO_0998.ISO / filesbbs / dos / sbbs230b.exe / EXEC.LZH / MATRIX.SRC < prev    next >
Encoding:
Text File  |  1995-08-31  |  2.6 KB  |  169 lines

  1. # MATRIX.SRC
  2.  
  3. # Baja answer module for Synchronet BBS v2.2
  4.  
  5. !include sbbsdefs.inc
  6. !define LAST 2
  7. logout
  8. node_status NODE_LOGON
  9.  
  10. compare_ars WIP
  11. if_true
  12.     exec_bin WIPLOGIN
  13.     return
  14.         end_if
  15.  
  16. int c m
  17.  
  18. :top
  19. compare c 10
  20. if_greater_or_equal
  21.     hangup
  22.     return
  23.     end_if
  24.  
  25. # Trigger scripts with old style prompt
  26. print "NN: "
  27. pause_reset
  28. cls
  29. cmd_home
  30. compare_user_misc UM_ANSI
  31. if_true
  32.     print "\x1b[H"
  33. else
  34.     cls
  35.         end_if
  36.  
  37. print "                        "
  38. print "4yh"
  39. print "╔══════════════════════════════╗n\r\n"
  40. print "                        "
  41. print "4yh"
  42. print "║         Logon Matrix         ║nb░░n\r\n"
  43. print "                        "
  44. print "4yh"
  45. print "╠══════════════════════════════╣nb░░n\r\n"
  46. print "                        4yh║ "
  47. compare m 0
  48.     if_equal
  49.         print "7bh"
  50.     else
  51.         print " 4wh"
  52.     end_if
  53. print " Existing User Account     "
  54. print "4y ║nb░░n\r\n                        4yh║ "
  55. compare m 1
  56.     if_equal
  57.         print "7bh"
  58.     else
  59.         print " 4wh"
  60.     end_if
  61. print " New User Account          "
  62. print "4y ║nb░░n\r\n                        4yh║ "
  63. compare m 2
  64.     if_equal
  65.         print "7bh"
  66.     else
  67.         print " 4wh"
  68.     end_if
  69. print " Guest User Account        "
  70. print "4y ║nb░░n\r\n                        4yh"
  71. print "╚══════════════════════════════╝nb░░n\r\nnb"
  72. print "                         "
  73. print " ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░n\r\n"
  74.  
  75. #sync
  76. getkey
  77.  
  78. # Down Arrow, Ctrl-J or 'D'
  79. cmdkeys ^JD
  80.     add m 1
  81.     compare m LAST
  82.     if_greater
  83.         set m 0
  84.         end_if
  85.     pause_reset
  86.     end_cmd
  87.  
  88. # Up Arrow, Ctrl-^ or 'U'
  89. cmdkeys ^^U
  90.     sub m 1
  91.     compare m 0
  92.     if_less
  93.         set m LAST
  94.         end_if
  95.     pause_reset
  96.     end_cmd
  97.  
  98. # Home or Ctrl-B
  99. cmdkey ^B
  100.     set m 0
  101.     end_cmd
  102.  
  103. # End of Ctrl-E
  104. cmdkey ^E
  105.     set m LAST
  106.         end_cmd
  107.  
  108. cmdkeys ABCDEFGHIJKLMNOPQRSTUVWXYZ*
  109.     ungetkey
  110.     cmd_pop
  111.     end_cmd
  112.  
  113. switch m
  114.     case 0
  115.         cls
  116.         print "Login: "
  117.         getstr str 25 K_UPRLWR|K_LOWPRIO|K_E71DETECT
  118.         truncsp str
  119.         compare_str ""
  120.         if_true
  121.             add c 1
  122.             goto top
  123.             end_if
  124.         login "PW: "
  125.         if_true
  126.             logon
  127.             if_true
  128.                 return
  129.                 end_if
  130.             end_if
  131.         pause
  132.         add c 2
  133.         goto top
  134.         end_case
  135.     case 1
  136.         setstr "%q"
  137.         compare_str "VERT"
  138.         if_true
  139.             yes_no Are you calling just to download Synchronet BBS software
  140.             if_true
  141.                 setstr "Guest"
  142.                 login "PW: "
  143.                 if_true
  144.                     logon
  145.                     if_true
  146.                         return
  147.                         end_if
  148.                     end_if
  149.                 end_if
  150.             end_if
  151.         newuser
  152.         logon
  153.         return
  154.         end_case
  155.  
  156.     case 2
  157.         setstr "guest"
  158.         login "PW: "
  159.         if_true
  160.             logon
  161.             if_true
  162.                 return
  163.                 end_if
  164.             end_if
  165.         end_case
  166.     end_switch
  167. goto top
  168.  
  169.