home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / SLUTILS.ZIP / SLUTILS.DOC < prev   
Encoding:
Text File  |  1992-12-10  |  18.8 KB  |  444 lines

  1.                     Searchlight Bulletin Board System (t)
  2.                           Autodoor Batch Utilities
  3.                                  Version 1.1
  4.  
  5. PRESIS
  6. ------
  7. A suite of Searchlight BBS (t) utilities to enhance the abilities of
  8. SLMAIL.EXE, VALIDATE.EXE and to provide the SLBBS (t) Sysop with tools for
  9. providing access based upon agreement with the SYSOP's criteria for use of
  10. the BBS.  Additionally, a simple questionnaire-type of utility is included to
  11. further enhance the SLBBS (t) Sysop's ability to process users.
  12.  
  13. INTRODUCTION
  14. ------------
  15. I originally purchased Searchlight (t) after reviewing a number of BBS
  16. packages.  One of my main criteria was the ability to extend the software
  17. easily.  As (something of) a programmer, I chafe when presented with few
  18. options for customization and control.  Of all the BBS software I reviewed, 
  19. Searchlight was, by far, the most extensible.  It also retains a very high
  20. level of simplicity from the Users' perspective and has a rather unique and
  21. pleasing interface.  By the same token, it is was not an "oddball" in the 
  22. sense of non-standard command keys, and, with the introduction of SL225, 
  23. can be fully configured to conform to the command key templates used by other
  24. popular and prevalent BBS software.  Frank LaRosa is to be commended for all 
  25. of this.
  26.  
  27. This package is intended to help you, as an SLBBS Sysop, to further extend
  28. your BBS and to bring you and your users a higher level of professionalism
  29. and enjoyment.  I wrote these utilities for myself and my BBS, and have had
  30. them running with good effect for over one year.  I consider them to be
  31. fully tested and debugged.  I am, therefore, releasing them now for the use
  32. and enjoyment of the SLBBS community.  
  33.  
  34. These utilities are distributed FREE of any obligation on the part of
  35. non-commercial users.  Absolutely no warranties, either express or implied,
  36. are made or given with respect to the fitness of these utilities for their 
  37. intended purpose, or for ANY purpose.  Side-Bar BBS and Shane Anderson
  38. hereby expressly disclaim any such warranties; further, by use of these
  39. utilities, you agree to indemnify and hold Side-Bar BBS and Shane Anderson
  40. harmless from damages, however constituted or plead, which might be
  41. attributed to use of these utilities.
  42.  
  43. Commercial users may contact the Sysop of Side-Bar BBS for inforamtion
  44. regarding the licensing of these utilities.  The number appears below.
  45.  
  46. At present I have no plans for extending these utilities, and I do not 
  47. expect that it will be necessary to "support" them.  However, I am willing 
  48. to entertain any suggestions or comments, and to consider the possibility 
  49. of taking these utilities further, as applicable.
  50.  
  51.  
  52.                                     (1) INSTALLATION
  53. ------------
  54.  
  55. The best place for these utilities, to guarantee that they will work, is the
  56. main BBS directory.  This is the directory where your CONFIG files are, and
  57. where you should have SLMAIL.EXE, VALIDATE.EXE, etc.  Simply copy the files
  58. into that directory and follow the examples and templates given for each
  59. utility below.  Please note that the archive should include the following
  60. files:
  61.  
  62. SL_MAIL.EXE
  63. SL_VAL.EXE
  64. AGREE.EXE
  65. QUERY.EXE
  66. SLUTILS.DOC
  67.  
  68. If you are concerned that you have not received a "clean" archive, you may 
  69. FREQ a source copy from my BBS at the address given at the end of this 
  70. document.  The "Magic Name" for the file is "SLUTILS."
  71.  
  72. You are, of course, welcome to log in and download it from the SLBBS 
  73. file directory.
  74.  
  75. SL_MAIL.EXE
  76. -----------
  77. One of the greatest revelations I had during my review of BBS software was
  78. the ability to run batch files as autodoors.  That feature nearly sold me on
  79. Searchlight (t) on the spot.  However, I did find that, due mostly to the
  80. vagaries and quirks of batch language, certain limitations were imposed on
  81. the way Frank LaRosa's SLMAIL.EXE could be used.  I found that I could not
  82. use SLMAIL.EXE to send a user a private or even public message from an 
  83. autodoor.  If I used the %N parameter to send JOE SMITH a message, the name
  84. JOE_SMITH was used.  In reality, there is no JOE_SMITH as far as SLBBS (t)
  85. is concerned.  So the message was not sent.  Using the %U parameter is not
  86. an option either, since SLMAIL will try to send the message to JOE, who also
  87. does not exist to SLBBS (t).  I tried using quotes, etc., in the batch file
  88. to cause the full name contained in the %U parameter to be carried over and
  89. passed by SLMAIL, but to no avail.  A "shell" program was clearly needed
  90. that would perform the translation of the parameter to an SLMAIL acceptable
  91. format, and to then call SLMAIL.EXE.
  92.  
  93. SL_MAIL.EXE is such a shell.  All it really does is take the %N parameter,
  94. translate it to the appropriate name and then call SLMAIL.  Accordingly, it
  95. is not, nor is intended to be, a replacement to SLMAIL.EXE.  Rather, it is
  96. an extension and an enhancement to be used in conjunction with SLMAIL.EXE.
  97.  
  98. The syntax of SL_MAIL.EXE, as you might expect, is essential identical to
  99. SLMAIL.EXE.  The following example is taken and adapted from my NEWUSER.BAT
  100. autodoor.  In this example, for the sake of simplicity, the batch file is
  101.  
  102.                                     (2) only being passed ONE parameter, namely the %U parameter.  To use other
  103. utilities in this package, you will wish to pass other parameters as well.
  104.  
  105. :NEW USER AUTODOOR BATCH FILE
  106. : %1 = User Name (%U)  
  107. :----------------------------
  108. .
  109. . {programming statements go here}
  110. .
  111. echo Mailing New User Information to %1's Mail Box . . .
  112. sl_mail S mail -t%1 -fSYSOP "-sNew User Information" -xc:\bbs\newinfo.txt
  113. .
  114. . {programming statements go here}
  115. .
  116.  
  117. As you can see, the file NEWINFO.TXT is being mailed to the new user's
  118. mailbox.  Nothing fancy, nothing too terribly earth shaking.  But it WILL
  119. allow you send messages to users from autodoors.  I find this useful in my
  120. two-tiered validation system, particularly in light of the fact that the
  121. whole process is automated and requires a certain amount of message passing
  122. to help orient my users.  With a little extra thought and batch file
  123. programming effort, you can easily personalize messages such as:
  124.  
  125. Dear Joe:
  126.  
  127. Thanks for your patience during the registration process...
  128.  
  129. Additionally, when used in conjunction with the utilities described below,
  130. you can set up some rather complex validation routines which result in the
  131. sending of various different messages based upon user security levels, etc.
  132.  
  133. If the above is not clear, please refer to the (excellent) documentation
  134. accompanying SLMAIL.EXE.
  135.  
  136.  
  137. SL_VAL.EXE
  138. ----------
  139. SLBBS' (t) VALIDATE.EXE suffers from the same "problem" that SLMAIL.EXE
  140. suffers from - namely, there is no way to pass a user's name to it from a
  141. batch file in order to upgrade (or downgrade) a user's security attributes
  142. and levels.  Again, it is a simple matter of needing a "shell" program to
  143. perform the translation.  SL_VAL.EXE performs that translation for
  144. VALIDATE.EXE, and again, is a mere "enhancement," not a replacement.
  145.  
  146. The following example has also been extracted and adapted from my
  147. NEWUSER.BAT autodoor:
  148.  
  149.  
  150.  
  151.  
  152.  
  153.                                    (3) :NEW USER AUTODOOR BATCH FILE
  154. : %1 = User Name (%U)  
  155. :----------------------------
  156. .
  157. . {programming statements go here}
  158. .
  159. sl_val %1 /A5 /F5 /T45 /R5 /SAB
  160. .
  161. . {programming statements go here}
  162. .
  163.  
  164. Simple enough.  As you can see, the user is being upgraded to have the
  165. security level of "5" for both the main and file functions, is being
  166. granted 45 minutes per day, a download Ratio of 5 to 1, and the Security
  167. Attributes of "AB."  If this is not clear, please refer to the (excellent)
  168. documentation accompanying VALIDATE.EXE.
  169.  
  170. Again, nothing earth shattering but certainly useful, particularly where you
  171. wish on-line, interactive validation of users.  One Caveat:  I have found,
  172. through experience that SLBBS (t) does not necessarily immediately
  173. recognize the new Time Limit given to the user.  All other attributes and
  174. levels ARE recognized, but the user is stuck with whatever time limit was
  175. initially imposed prior to validation using this utility.  However, the new
  176. time limit does go into effect upon the next login by the user.  For example
  177. - let's say that the user has 30 minutes and is at level "2."  Once the
  178. above example validation is performed, he will have all of the new
  179. attributes and levels specified, but will still have only 30 minutes (or
  180. balance thereof) during the current session.  While this is unavoidable from
  181. my perspective, you should note that upon expiration of the 30 minutes, the
  182. user will still be able to log in for 15 minutes more during the same day. 
  183. Thereafter, he will always have 45 minutes per day.
  184.  
  185. This utility does not really stand by itself, and is intended to be used
  186. with the utilities discussed below.
  187.  
  188. AGREE.EXE (aka C Y A!)
  189. ---------
  190. I wrote this utility to dispatch my duties as a SYSOP and to protect myself
  191. from any claims that the user was not aware of any applicable legal
  192. disclaimers, and to obtain full agreement with the terms and conditions
  193. imposed upon users of my BBS.  Quite simply, the utility displays a screen
  194. to the user, and asks the user if he agrees to the terms and conditions
  195. presented by that screen.  
  196.  
  197. The program then drops an errorlevel to the calling batch file based upon the
  198. answer.  Thus, you can branch to the appropriate batch file label based upon 
  199. the user's response.  This allows you to set up a validation scheme which, 
  200. perhaps at the very beginning, allows access on the basis of a user's 
  201. agreement or disagreement to the terms and conditions of use.
  202.  
  203.  
  204.                                    (4) The syntax of AGREE.EXE is as follows:
  205.  
  206. AGREE [path] [prefix] [agree] [noagree] [name] [g] [color]
  207.  
  208. WHERE:
  209.  
  210.  [path]    the path to the display screens
  211.  [prefix]  the prefix of the screens - eg: prefix of test.ans, test.txt =   
  212.            test
  213.  [agree]   the log filespec for logging users who have agreed
  214.  [noagree] the log filespec for logging users who have NOT agreed
  215.  [name]    the SLBBS parameter for user name - %U
  216.  [g]       the SLBBS parameter for graphics - %G
  217.  [color]   the numeric color value for the "-- more --" prompt
  218.  
  219. To invoke a "-- more --" prompt, place the control characters "^S^P" in the 
  220. files to be "typed" to the screen at the position in the file where you wish 
  221. to pause.  The characters "^S^P" are Ctrl-S and Ctrl-P, NOT "Caret-S,"
  222. "Caret-P."
  223.  
  224. Please note that your ANSI and Non-ANSI screens MUST use the extensions
  225. ".ANS" and ".TXT."
  226.  
  227. The errorlevels dropped by AGREE.EXE are simply 1 and 0, and correspond to
  228. "Yes" and "No" respectively.
  229.  
  230. Colors are expressed as follows:
  231.  
  232.           Black       -  0         Dark Gray      -  8
  233.           Blue        -  1         Light Blue     -  9
  234.           Green       -  2         Light Green    -  10
  235.           Cyan        -  3         Light Cyan     -  11
  236.           Red         -  4         Light Red      -  12
  237.           Magenta     -  5         Light Magenta  -  13
  238.           Brown       -  6         Yellow         -  14
  239.           Light Gray  -  7         White          -  15
  240.  
  241. The following example is adapted from my NEWUSER.BAT autodoor.  Please note
  242. that, here, more parameters are being passed to the batch file, as required
  243. by AGREE.EXE.  Please also note that I have included SL_MAIL.EXE and 
  244. SL_VAL.EXE calls, as discussed above, to help you see how all of these
  245. utilities work together, and that I have even included a little batch
  246. environment trick for typing the appropriate ANSI or text "information" 
  247. screens to the monitor:
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.                                   (5) :NEW USER AUTODOOR BATCH FILE
  256. : %1 = User Name  (%U)
  257. : %2 = Graphics Mode  (%G)
  258. : %3 = First Name (effectively) (%N)
  259. :----------------------------
  260. @echo off
  261. cd\bbs
  262.  
  263. : /* this small subroutine sets an environment variable for use in
  264. :    typing "information" screens to the monitor. */
  265.  
  266. if "%2"=="C" goto ansi
  267. if "%2"=="M" goto ansi
  268. if "%2"=="N" goto NONE
  269. :ansi
  270. set SCR=ANS
  271. goto VALIDATE
  272. :NONE
  273. set SCR=TXT
  274.  
  275. : /* the following comprises a two-step agreement process.  The call to
  276. :    AGREE.EXE shows a standard Disclaimer Screen to the user and asks him to
  277. :    agree to its terms. If the user does not agree to screen displayed,
  278. :    his or her access is set to pretty much "0" all around.  If he or she
  279. :    DOES agree, he or she is validated to a higher level.  */
  280.  
  281. :VALIDATE
  282. cd\bbs
  283. cls
  284. agree c:\bbs\include ecpa c:\bbs\ecpa.log c:\bbs\no_ecpa.log %1 %2 12
  285. REM if "Yes"
  286. if errorlevel 1 goto agree
  287. REM if "No"
  288. goto no_agree
  289.  
  290. :agree
  291. REM increase access...
  292. sl_val %1 /A2 /F2 /T30 /R5 /SAB
  293. REM type appropriate thank you screen
  294. type c:\bbs\thanks.%SCR%
  295. echo %3, Please press {ENTER} to continue
  296. pause>nul 
  297. echo Mailing New User Information to %3's Mail Box . . .
  298. sl_mail S mail -t%1 -fSYSOP "-sNew User Information" -xc:\bbs\newinfo.txt
  299. goto CLEAN
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                                       (6)                                :no_agree
  307. cd\bbs
  308. sl_val %1 /A0 /F0 /T10 /R3 /SA
  309. REM type appropriate SORRY, ERNT, WRONG, TOO BAD! screen...
  310. type c:\bbs\no_agree.%SCR%
  311. echo %3, Please press {ENTER} to continue
  312. pause>nul
  313. echo Mailing GUEST User Information to %3's Mail Box . . .
  314. sl_mail S mail -t%1 -fSYSOP "-sLimited Access Information" -xc:\bbs\limit.txt
  315.  
  316. :CLEAN
  317. REM clean up environment
  318. set SCR=
  319. cd\bbs
  320. cls
  321.  
  322.  
  323. Now, while the above may seem somewhat complicate at first, it is actually
  324. pretty straightforward.  A little study should make it clear.  I am
  325. confident that this will work, with some work on your part in putting the
  326. screens together and adjusting the paths to reflect the reality of your
  327. system.
  328.  
  329. I HIGHLY recommend that, if you do use this utility for the purposes of
  330. disclaimers and legal notices, you keep your logs INTACT and ALWAYS on file.
  331. As a paralegal and a student of privacy, etc. issues as relates to
  332. electronic communications, I assure you that we CANNOT be too careful in 
  333. this regard.
  334.  
  335. QUERY.EXE
  336. ---------
  337. I wrote this simple utility because I did not need or even like the various
  338. script questionnaire utilities currently available.  For a simple
  339. questionnaire, it was rather the case of shooting a mouse with an elephant
  340. gun - difficult and awfully messy!  I therefore wrote this simple utility to
  341. be straightforward and even idiotic, but pleasing to the eye.
  342.  
  343. USAGE:  QUERY [questionnaire] [output] [name] [graphics] <switches>
  344.  
  345. WHERE:
  346.  [questionnaire] =>  text file containing questions;
  347.  [output]       =>  text file for logging answers
  348.  [name]         =>  users name using the SLBBS "%U" parameter
  349.  [graphics]     =>  the SLBBS parameter for graphics mode
  350.  <switches>     =>  optional switches as follows:
  351.                     /M or /m  =>  mail answers to SYSOP
  352.                     /V or /v  =>  use verbose format
  353.  
  354. The following text presents the format of [questionnaire] file.
  355.  
  356.  
  357.                                 (7) Please describe some of your interests:
  358. What BBS services do you make the most use of (eg: NetMail, Files, etc.):
  359. Are you currently employed?  (If so, please describe:)
  360. How did you hear about SIDE-BAR BBS?
  361.  
  362.  
  363. Simple, eh?  No script language or control codes.  Simple text! 
  364. Limited, but useful.  Please note that a carriage return should follow the
  365. last line in the text file for the utility to properly process the entire
  366. text of the file.  Please note, further, that you may place multiple carriage
  367. returns anywhere in a questionnaire file in order to present "blank" lines. 
  368. Thus, in the following example, two "blank" lines would be presented after
  369. the initial line with the question, for a total of three lines of text.  
  370.  
  371.  
  372. Please enter feedback (three lines)
  373.  
  374.  
  375. Any other comments?
  376.  
  377. It might be better to use the following format, however, so that the user
  378. does not think he is locked.
  379.  
  380. Please enter feedback (three lines)
  381. (Line 2 of 3)
  382. (Line 3 of 3)
  383. Any other comments?
  384.  
  385. It is important to have QUERY in the same directory as SLMAIL.EXE and 
  386. SL_MAIL.EXE, since these utilities are used to mail the Sysop responses to
  387. the questionnaire, if desired.
  388.  
  389. If the /M switch is used, the answers will be logged __AND__ sent to
  390. the SYSOP'S Mailbox - the user name is parsed so that a reply to the
  391. questionnaire can be made by the SYSOP.  If the /V switch is used, the
  392. questions __AS WELL AS__ the answers will are logged in the [output]
  393. file.  When the /V switch is not used, only the answers are logged.  I
  394. personally prefer the verbose format.
  395.  
  396. Both [questionnaire] and [output] parameters support path names.
  397.  
  398. This utility is very nice for feedback doors, etc. where you do not wish to
  399. use complicated script utilities and where answers are straightforward and do
  400. not require branching based upon the response.  I use it in the instance of
  401. a user who has not initially agreed to the terms and conditions of use for
  402. the BBS.  When that user goes into my validation door for the purposes of
  403. upgrading his account, I ask why he or she or she did not initially agree. 
  404. I have the answers sent to me, and, because of the proper translation of the
  405. name of the (offending) party, I can then reply to that user's reason for
  406. not initially agreeing.
  407.  
  408.                                    (8) PUTTING IT ALL TO WORK FOR YOU
  409. ------------------------------
  410.  
  411. As related previously, I have had this type of setup running, in a much more
  412. complex configuration, for over a year now and it works quite nicely.  I
  413. have received no complaints from users, and have been freed from some of the
  414. more rigorous and time consuming duties on the BBS such as manual
  415. validation through the use of "Please write the SYSOP a private message to
  416. request validation and include..."  My system actually presents two levels
  417. or agreements that a new user must agree to; then, if I have total
  418. agreement, I present the user with the ability to further upgrade himself
  419. through call-back verification.  This system works very nicely. 
  420. Additionally, with some further work, those users who did not agree may be
  421. presented with the opportunity, via a door, to agree to the questions again, 
  422. thereby upgrading themselves.  This further cuts down on the incidence of
  423. messages such as "I meant to agree, but I pressed the wrong button..."  The
  424. fact that AGREE.EXE provides you with logs of just who agreed and who did
  425. not agree can be used to great effect.  You can even set it up so that when
  426. a user does not agree, you send yourself a message indicating who it was
  427. that did not agree, for further disposition, if any.  The QUERY.EXE utility
  428. rather pulls it all together for a full suite of utilities that should help
  429. you as a SLBBS (t) sysop to process and present various options for
  430. validation, questionnaire, and massaging, without needing to resort to
  431. highly manual methods.
  432.  
  433.  
  434. We hope that these utilities will help... if they do, please take the time
  435. to comment to me via netmail or otherwise.
  436.  
  437. BEST,
  438.  
  439. Shane G. Anderson
  440. Sysop, Side-Bar BBS
  441. 818/783-2069
  442. FidoNet:  1:102/819 
  443. (Sherman Oaks, California)
  444.