home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / bsys098b.zip / B&BSYSOP.DOC < prev    next >
Text File  |  1993-11-19  |  18KB  |  613 lines

  1.                                      -=-
  2.  
  3.                     The Bits & Bytes Bulletin Board System
  4.                                     B&BSYS
  5.  
  6.                                      -=-
  7.  
  8.                         This documentation is for v0.98ß
  9.  
  10.                                      -=-
  11.  
  12.                 All included material is copyright 1991-93 by:
  13.  
  14.                               Terje Flaar¢nning
  15.                               Boks 455 Sentrum
  16.                               N-7001 Trondheim
  17.                                    Norway
  18.  
  19.                              Voice: +47-PRIVATE
  20.                               BBS: +47-DOWNNOW
  21.  
  22.                                      -=-
  23.  
  24.     Please note, the BITS0001 bulletin should also be read, it may include 
  25.            important changes to the information in this file.
  26.  
  27.                                      -=-
  28.  
  29.  
  30.                                     INDEX
  31.                                    -=====-
  32.  
  33. 1 Introduction to B&BSYS
  34.  
  35.   1.1  The history behind B&BSYS
  36.   1.2  B&BSYS vs. other BBS-systems
  37.   1.3  First time B&BSYS setup
  38.  
  39. 2 Configuration of B&BSYS
  40.  
  41.   2.1  CONFIGURATION WITH THE U(til) Co(nfig) COMMAND
  42.  
  43.     2.1.1  General
  44.     2.1.2  Path names
  45.     2.1.3  File protocols
  46.     2.1.4  Archive programs
  47.     2.1.5  Nodes (Comms)
  48.     2.1.6  Timed events
  49.     2.1.7  Net-links
  50.     2.1.8  Areas
  51.  
  52.   2.2  DOOR.BAT
  53.  
  54. 3 Menu by menu in the B&BSYS interface
  55.  
  56.   3.1  GLOBAL MENU FUNCTIONS
  57.   3.2  MAIN MENU
  58.   3.3  MESSAGE MENU
  59.   3.4  FILE MENU
  60.   3.5  BULLETIN MENU
  61.   3.6  CHAT MENU
  62.  
  63. 8 Script language
  64.  
  65.   8.1  Scripts called
  66.   8.2  Script variables
  67.   8.3  Script commands
  68.  
  69. 9 Technical info
  70.  
  71.   9.1  File structures
  72.   9.2  B&B |API
  73.  
  74.  
  75. =I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=I=
  76.  
  77. 1        INTRODUCTION TO B&BSYS
  78.          ══════════════════════
  79.  
  80. 1.1      THE HISTORY BEHIND B&BSYS
  81.          ─────────────────────────
  82.  
  83. My first meeting with modem-communications was in the summer of 1989 when
  84. I realiced there was telephone connectors at the back of my PC (a old ITT
  85. XTRA from 1984). I managed to connect to a local BBS and became a frequent
  86. user there. But, my local BBS had to close down and I had to start calling
  87. long distance which was not cheap. After a short while I got the idea to
  88. start my own BBS. My first BBS was using the MBBS ((C) Mike Robertson) BBS-
  89. system and was online from early 1990. I connected to national networks and
  90. when I got more and more conferences the MBBS system became to small, it
  91. only supported 75 conferences. Therefore I started to make my own BBS-system
  92. which is known as "The Bits & Bytes Bulletin Board System" or B&BSYS for
  93. short.
  94.  
  95.  
  96. 1.2      B&BSYS VS. OTHER BBS-SYSTEMS
  97.          ────────────────────────────
  98.  
  99. B&BSYS is in many way like other BBS-systems. The main difference that it is
  100. almost unlimited how big your system may grow. B&BSYS consist of a database-
  101. structure so advanced that much bigger systems just can dream about it. This
  102. system is not just another program but it is following major software
  103. development rules.
  104.  
  105. B&BSYS has a user friendly interface and it is almost impossible to "break"
  106. the system by doing bad commands or such.
  107.  
  108.  
  109. 1.3      FIRST TIME B&BSYS SETUP
  110.          ───────────────────────
  111.  
  112. B&BSYS is easy to setup, and if you follow the following steps it should
  113. be up and running in minutes.
  114.  
  115.   [1] Unpack you archives, at current version there is a ZIP archive
  116.       with directories in it so you should use the "-d" parameter to
  117.       PKUNZIP.
  118.  
  119.   [2] Run your serial number installation program. This program is the
  120.       one you got directly from me, it is named with your first name and
  121.       it is a small .EXE file.
  122.  
  123.   [3] Start up B&BSYS with the "/INIT" parameter. Do not use the B&B.BAT
  124.       file to start, simply type B&BSYS /INIT.
  125.  
  126.   [4] Type B&BSYS to make the B&B.BAT file.
  127.  
  128.   [5] Now, start B&BSYS by typing B&B 0 (0 is your local SysOp node) and
  129.       register with the name "SYSOP SYSOP".
  130.  
  131.   [6] When you are on B&BSYS command line, type $ to enter the SysOp menu
  132.       where you execute the Co(nfig) command and change the SysOpname under
  133.       the General section of the config. Then, leave the config editor.
  134.  
  135.   [7] Now, go to the utility menu with the U(til) command and change your
  136.       name there also, use the N(ame) command.
  137.  
  138.   [8] But before you do all this, print out this instruction or write it
  139.       down.
  140.  
  141. That is all, now you should configure your B&BSYS BBS as you wish by using
  142. the Co(nfig) command in the SysOp menu. Good luck.
  143.  
  144.  
  145. =2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=2=
  146.  
  147.  
  148. 2        CONFIGURATION OF B&BSYS
  149.          ═══════════════════════
  150.  
  151. 2.1      CONFIGURATION WITH THE U(til) Co(nfig) COMMAND
  152.          ──────────────────────────────────────────────
  153.  
  154. 2.1.1    General
  155.          ───────
  156.  
  157. Choose this option to edit the name of your BBS, the name of the current
  158. SysOp, time-limit to give to new users, max inactivity time before automatic
  159. logoff, access level given to new users, smallest normal access level.
  160.  
  161.  
  162. 2.1.2    Path names
  163.          ──────────
  164.  
  165. Here you may edit information about a RAM-Disk (swap disk) just the drive-
  166. letter followed by a colon should be entered. At the scratchpad field you
  167. should give a complete path without a extension (place it on you RAM-Disk
  168. if it is big) but with the ".".
  169.  
  170. CD-ROM Drive letters represent your CD-ROM players.
  171.  
  172.  
  173. 2.1.3    File protocols
  174.          ──────────────
  175.  
  176. Some examples:
  177.  
  178.    Letter: Z  Name: ZModem            OkErr: 0  Type: B_A
  179.      Path: C:\UTIL\DSZ.COM
  180.    Upload: port &p speed &s ha both rz &u
  181.  Download: port &p speed &s ha both sz &l
  182.   AutoRec: "**"#24
  183.  
  184.    Letter: Y  Name: YModem            OkErr: 0  Type: B__
  185.      Path: C:\UTIL\DSZ.COM
  186.    Upload: -k port &p speed &s ha both rb &u
  187.  Download: -k port &p speed &s ha both sb &l
  188.   AutoRec:
  189.  
  190.    Letter: S  Name: HS/Link 1.20      OkErr: 0  Type: BBA
  191.      Path: C:\TELIX\HSLINK\FHSLINK.EXE
  192.    Upload: -P&p -B&s -U&u
  193.  Download: -P&p -B&s -U&u &l
  194.   AutoRec: "HS*"#2
  195.  
  196.  
  197. 2.1.4    Archive programs
  198.          ────────────────
  199.  
  200. 2.1.5    Nodes (Comms)
  201.          ─────────────
  202.  
  203. 2.1.6    Timed events
  204.          ────────────
  205.  
  206. As I think you already have notified B&BSYS can run timed events. A event
  207. consist of a entry in your system setup including when to run and such
  208. information, you must also make a DOS batch file for the event.
  209.  
  210. The event batch files is to be placed in your B&BSYS root directory and
  211. should be named EVENTxxx.ee (xxx is your prepadded node number and ee is
  212. a prepadded event number which range from 01 to 10).
  213.  
  214. If you will make this batch files start other batch files, you MUST use the
  215. CALL statment so the control is returned the the main batch file after
  216. executing of a secondary batch.
  217.  
  218.  
  219. 2.1.7    Net-links
  220.          ─────────
  221.  
  222. 2.1.8    Areas
  223.          ─────
  224.  
  225.  
  226. 2.2      DOOR.BAT
  227.          ────────
  228.  
  229. B&BSYS has the ability to run doors (external program, games ... ) all
  230. doors is executed via the DOOR.BAT file in your B&BSYS-root directory.
  231.  
  232. DOOR.BAT is called with these parameters:
  233.  
  234. DOOR.BAT [Node#1] [Node#2] [ComPort] [PortSpeed] [BaseAddr] [IrqVector]
  235.          [DoorName] [DoorCode]
  236.  
  237. Node#1    is the number of the node, this is not prefilled.
  238.  
  239. Node#2    is the number of the node, this is prefilled with zero's to a
  240.           length of three characters.
  241.  
  242. ComPort   is current comport
  243.  
  244. PortSpeed is current comport speed
  245.  
  246. BaseAddr  These are the base/irq data in the node setup (PS! Be sure to
  247. IrqVector set these to the same values as your fossil driver)
  248.  
  249. DoorName  The name or number of the door to be executed
  250.  
  251. DoorCode  The B&BSYS DoorCode for current area
  252.  
  253. Expamles:
  254.  
  255. DOOR.BAT 3 003 1 19200 02e8 3 1 MAIN
  256. DOOR.BAT 2 002 3 9600 03f8 4 TheGame GAME
  257.  
  258.  
  259. =3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=3=
  260.  
  261.  
  262. 3        MENU BY MENU IN THE B&BSYS INTERFACE
  263.          ════════════════════════════════════
  264.  
  265. 3.1      GLOBAL MENU FUNCTIONS
  266. 3.2      MAIN MENU
  267. 3.3      MESSAGE MENU
  268. 3.4      FILE MENU
  269. 3.5      BULLETIN MENU
  270. 3.6      CHAT MENU
  271.  
  272. =8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=8=
  273.  
  274.  
  275. 8        SCRIPT LANGUAGE
  276.          ═══════════════
  277.  
  278. B&BSYS offers a small script language to allow you to make you own look
  279. of you BBS. The scripts are called before or after important internal
  280. functions of B&BSYS. All scripts should be placed in the SCRIPTS sub-
  281. directory.
  282.  
  283.  
  284. 8.1      SCRIPTS CALLED
  285.          ──────────────
  286.  
  287. The following script files will be executed if they are present in the
  288. SCRIPT sub-directory:
  289.  
  290. GOODBYE.*   This script is executed when a user use the G(oodbye) command
  291.             to exit B&BSYS or just drop the line. The script does also
  292.             function as a goodbye bulletin.
  293.  
  294. LOGIN.*     This script is executed just before the user gets his command
  295.             prompt (after display of users stats).
  296.  
  297. PREDOWN.*   These scripts is executed before and after downloads, the scripts
  298. POSTDOWN.*  can be used to control download rules and so on, the scripts also
  299.             function as file transfer bulletins, but only with normal file
  300.             transfers.
  301.  
  302. PREUP.*     Same as the *DOWN.* scripts but for uploads.
  303. POSTUP.*
  304.  
  305. PREOPEN.*   Same as the *DOWN.* scripts but for door usage. Be aware these
  306. POSTOPEN.*  scripts function in all areas.
  307.  
  308. PREREG.*    These scripts is executed before and after a new users register.
  309. POSTREG.*
  310.  
  311. U-[com].*   Called from Utility menu if unknown command.
  312. B-[com].*   Called from Bulletin menu if unknown command.
  313. C-[com].*   Called from Chat/Node menu if unknown command.
  314. $-[com].*   Called from $ysOp menu if unknown command.
  315. F-[com].*   Called from File menu if unknown command.
  316. R-[com].*   Called from Read menu if unknown command.
  317.  
  318. G-[com].*   Called from all menus if none of the above exits and unknown
  319.             command.
  320.  
  321. The astrix is a language key or just nothing for multilangual scripts.
  322.  
  323.  
  324. 8.2      SCRIPT VARIABLES
  325.          ────────────────
  326.  
  327. In scripts you have several variables for you usage, these are:
  328.  
  329. &[1-9]  User variables.
  330. &ac     Current area code.
  331. &ad     Current area door-code.
  332. &af     Current area file-code.
  333. &an     Current area name.
  334. &td     Current date.
  335. &th     Current time (hour).
  336. &tm     Current time (minute).
  337. &tu     Time used so far this logon, in minutes.
  338.  
  339. &u - - - USER RECORD VARIABLES
  340. &ua1      First line of address
  341. &ua2        Second line of address
  342. &ual    Accesslevel
  343. &uc     City
  344. &ud#    Number of downloads
  345. &udk    KB downloaded
  346. &uf            First name
  347. &ul            Last name
  348. &umw        Messages written
  349. &umr        Messages read (Not counted in B&BSYS yet)
  350. &un            Name
  351. &uph        Home phone
  352. &upw        Work phone
  353. &uu#    Number of uploads
  354. &uuk    KB uploaded
  355. &uta    Time allowed each 24 hours
  356. &utl    Time left when logging on (&utl - &tu = time left)
  357. &utt        Time totally used
  358.  
  359. &$ - - - SYSTEM DATA VARIABLES
  360. &$v     Display current B&BSYS version.
  361. &$m            Current menu level: M(ain), R(ead), F(ile) and so on.
  362.  
  363. &! - - - DISPLAY SETUP/MANIPULATION PROCEDURES
  364. &!l            Do linefeeds until cursor resides at the bottom screen line.
  365. &!m            Do more prompt.
  366. &!w            Wait for keypress before continue.
  367.  
  368.  
  369. The variables can be used everywhere in your scripts.
  370.  
  371.  
  372. 8.3      SCRIPT COMMANDS
  373.          ───────────────
  374.  
  375. A script language without commands is nothing so here they come to, these
  376. commands are available for script programming:
  377.  
  378. @+ [uservar] [firstnumber] [secondnumber]
  379. ""
  380. @- [uservar] [firstnumber] [secondnumber]
  381. ""
  382. @* [uservar] [firstnumber] [secondnumber]
  383. ""
  384. @/ [uservar] [firstnumber] [secondnumber]
  385. ""
  386.  
  387. @assign [uservar] [textstring]
  388. """""""
  389.   Assigns a textstring to a uservariable
  390.  
  391.   "@assign 1 This is a string"
  392.  
  393. @command [commandline]
  394. """"""""
  395.     Execute standard B&BSYS command from a script.
  396.  
  397.   "@command Read Enter Sysop"
  398.  
  399. @delfile [filename] {filename} {filename} ...
  400. """"""""
  401.   Delete one or more files on the harddisk.
  402.  
  403.   "@delfile B&BSYS.EXE" (not try this)
  404.  
  405. @exit
  406. """""
  407.   End script execution and return to B&BSYS.
  408.  
  409.   "@exit"
  410.  
  411. @file [filename]
  412. """""
  413.   Open a file for output, the file is created if it do not exist.
  414.  
  415.   "@file scripts\tempfile.lst"
  416.  
  417. @goto [label]
  418. """""
  419.   Go to @[label].
  420.  
  421.   "@goto firstlabel"
  422.  
  423. @if [firststring] [secondstring] [label]
  424. """
  425.   Compare two strings, if equal the goto [label] of not then continue.
  426.  
  427.   "@if String String ThisLabel"
  428.  
  429. @if [firstnumber] [<|=|>] [secondnumber] [label]
  430. """
  431.   Compare two numbers, if condition is TRUE the goto [label] if not then
  432.   continue.
  433.  
  434.   "@if 1 = 2 OneLabel"
  435.  
  436. @iffile [filename] [label]
  437. """""""
  438.   If file [filename] exist the goto [label] if not then continue.
  439.  
  440.   "@iffile scripts\tempfile.lst"
  441.  
  442. @input [uservar] [prompt]
  443. """"""
  444.   Let the user input a text string into the given uservar.
  445.  
  446.   "@input 1 Type a command:"
  447.  
  448. @log [text]
  449. """"
  450.   Write a line to node log file. If [text] start with "$" the text go to
  451.   the .SYS log instead of the normal node log.
  452.  
  453.   "@log $User has failed"
  454.  
  455. @mod [uservar] [firstnumber] [secondnumber]
  456. """"
  457.  
  458. @run [program] [parameters]
  459. """"
  460.   Runs an external program.
  461.  
  462.   "@run b&bsys.exe"
  463.  
  464. @rundos [program] [parameters]
  465. """""""
  466.   Same as @run, but this loads a new command interpreter before running
  467.   your program.
  468.  
  469.   "@rundos b&b.bat"
  470.  
  471. @select [words] [prompt]
  472. """""""
  473.   Wait for user input.
  474.  
  475.   "@select YesNo Delete message?" (this go to first @Y or @N after present
  476.                                                                    line)
  477.  
  478. @set [sysvar] [value]
  479. """"
  480.   Set a specific system variable to given value.
  481.   [sysvar] [value]
  482.   menu     M,R,B,F,C,$,U
  483.  
  484. @show [filename]
  485. """""
  486.   Type a textfile.
  487.  
  488.   "@show scripts\tempfile.lst"
  489.  
  490. @write [text]
  491. """"""
  492.   Write a text to open file, no CRLF included.
  493.  
  494.   "@write This is a text"
  495.  
  496. @writeln [text]
  497. """"""""
  498.   Write a text to open file, CRLF included.
  499.  
  500.   "@writeln This is a text line"
  501.  
  502. =9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=9=
  503.  
  504.  
  505. 9        TECHNICAL INFO
  506.          ══════════════
  507.  
  508. 9.1      FILE STRUCTURES
  509.          ───────────────
  510.  
  511. B&BSYS.CFG - Main configuration file
  512. ~~~~~~~~~~
  513.    1 Version            Str19          B&BSYS version which created file,
  514.                                        do never change this.
  515.   21 BoardName          Str30          Your BBS's name
  516.   52 Country            Str4             Net country code
  517.   57 Region             Word             Country region number
  518.   59 Node               Word             Region Board number
  519.   61 Board              Str10            Board shortname
  520.   72 SysOpName          Str30          SysOp's name
  521.  103 n/d
  522.  120 NewUserTimeLimit   Word           Time limit given to new users (min)
  523.  122 NewUserLevel       Byte           User level given to new users (0-15)
  524.  123 NormalUserLevel    Byte           Lowest normal user level (0-15)
  525.  124 ScratchPadPath     Str79
  526.  204 PKUNZIPPath        Str79
  527.  284 PKZIPPath          Str79
  528.  364 JModemPath         Str79
  529.  444 BiModemPath        Str79
  530.  524 RAMDiskDir         Str67
  531.  592 InactivityTime     Word
  532.  594 n/u
  533.  779 n/d
  534.  793 n/d
  535.  853 HyperPPath         Str79
  536.  933 PkArcPath          Str79
  537. 1013 PkXArcPath         Str79
  538. 1093 LHAPath            Str79
  539. 1173 LYNXPath           Str79
  540. 1253 CDROMDriveLetters  Chars (1-10)
  541. 1263 n/u
  542.  
  543. Total file size is 4096 Bytes.
  544.  
  545.  
  546. AREA*.DIR - Area file database main file
  547. ~~~~~~~~~
  548.    1 FileName           Str12
  549.   14 Description        Str46
  550.   61 Date.Year          Word
  551.           Month         Byte
  552.           Day           Byte
  553.   65 Time.Hour          Byte
  554.           Min           Byte
  555.   67 UploadedBy         LongInt
  556.   71 Size               LongInt
  557.   75 Downloads          Word
  558.   77 DirNo              Word
  559.   79 Password           Str8
  560.   88 UploadedTo         LongInt
  561.   92 CDROM              Byte
  562.   93 CDPath             Str30
  563.  124 Flags
  564.  125 n/d
  565.  
  566. Total record size is 128 Bytes. Be sure to run complete file sort after
  567. modifications to this file. Index files will be documented later.
  568.  
  569. 9.2      B&B API
  570.          ───────
  571.  
  572. B&BSYS has unlike other BBS-software products it's own Advanced Programmers
  573. Interface (API), this API is active when the system shells to DOS in any
  574. way (running doors, script @run and @rundos commands ... ). The API resides
  575. on interrupt $63. AH register is command selector.
  576.  
  577. $00 INSTALLATION CHECK
  578.  
  579.     Par: AL    $00     - Just check
  580.         Ret: AX    $1041 - B&BAPI installed
  581.  
  582. $01 PRINT STRING
  583.  
  584.     Par: AL    $00   - Normal output
  585.                          $01   - Normal output with CR+LF
  586.                $02   - Same as $00 with access to system variables
  587.                $03   - Same as $02 with CR+LF
  588.          ES:DI       - Address of TP-String
  589.     Ret: AH         $F0     - Carrier lost
  590.  
  591. $02 READ STRING
  592.  
  593.     Par: AL    $00     - Normal input (Mixed case, no limitations)
  594.               ES:DI              - Address of TP-String used as default string
  595.     Ret: AH         $F0   - Carrier lost
  596.  
  597. $03    READ CHAR
  598.  
  599.     Par: AL         $00   - Return first char in buffer if any
  600.                          $01   - Return first char in buffer or wait for key to return
  601.     Ret: AH         $00   - Ok, normal AscII char received
  602.                          $01     - Ok, control char received
  603.                $10   - No characters received
  604.                $F0     - Carrier lost
  605.          AL                 - Character
  606.  
  607. $04 MODEM DIRECT
  608.  
  609.     Par: AL    $00   - Put string in modem output buffer
  610.          AL    $10   - Read string from modem input buffer
  611.          ES:DI       - Address of TP-String
  612.     Ret: AH    $00   - Ok, string sent/received
  613.