home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / easyon1a.zip / EASYTIME.TXT < prev    next >
Text File  |  1993-09-27  |  7KB  |  172 lines

  1.  
  2.  
  3.        ▓▓▓▓▓▓▓▓                         ▓▓▓▓▓▓▓▓▓▓
  4.        ▓▓                                   ▓▓
  5.        ▓▓         ▓▓    ▓▓▓▓▓▓ ▓▓    ▓▓     ▓▓    ▓▓ ▓▓▓  ▓▓▓ ▓▓▓▓▓▓
  6.        ▓▓▓▓▓▓    ▓  ▓   ▓▓      ▓▓  ▓▓      ▓▓    ▓▓ ▓▓▓▓▓▓▓▓ ▓▓
  7.        ▓▓       ▓▓▓▓▓▓  ▓▓▓▓▓▓   ▓▓▓▓       ▓▓    ▓▓ ▓▓ ▓▓ ▓▓ ▓▓▓▓
  8.        ▓▓       ▓▓  ▓▓      ▓▓    ▓▓        ▓▓    ▓▓ ▓▓    ▓▓ ▓▓
  9.        ▓▓▓▓▓▓▓▓ ▓▓  ▓▓  ▓▓▓▓▓▓    ▓▓        ▓▓    ▓▓ ▓▓    ▓▓ ▓▓▓▓▓▓
  10.  
  11.  
  12.  
  13.  
  14. copyright 1993 by Mark Bernard
  15.  
  16. Maximus copyright by Scott Dudley.
  17. BinkleyTerm copyright by Bit Bucket Software.
  18.  
  19.  
  20. Use at your own risk an all that usual stuff.... no guarantees whatsoever.
  21.  
  22.  
  23. -Features:
  24.  
  25. -Ability to set your cpu clock with data received with your caller-id
  26.  information. It does this with the first BBS caller that calls after the 
  27.  program is "Loaded" by using the EasyLoad.cmd. (This just creates a simple
  28.  flag-file that EasyTime looks at. If the flag-file says that it's "unloaded",
  29.  the script simply exits.  If the file is "loaded", then it changes the time on
  30.  your cpu. Can be loaded as frequently as you wish, by placing in one of your
  31.  regular routines in your binkley.cmd!
  32. -Ability to take different time-zones into account (BUT always relative to the
  33.  local time received from the caller-id, so has to be reset as time changes 
  34.  to daylight savings and back). This can be remedied... see below.
  35. -Ability to log the time-changes (logs the cpu date/time before the time 
  36.  re-set, and after).
  37.  
  38. Compatability:
  39.  
  40. Tested on:
  41.  
  42. 486-33, 8MB RAM.
  43. Running OS/2 2.0 (GA + kernal fix + SOM fix + REXXUtil update), and OS/2 2.1 GA.
  44.  
  45. Using Binkley 2.56, Maximus 2.01wb.
  46.  
  47. Supra 14.4 Faxmodem with 1.2J, and 1.70B-04 ROMs. (That DO NOT SUPPORT
  48. caller-id in my telephone exchange... so I made it work anyway!)
  49.  
  50.  
  51. Installation:
  52.  
  53.  1) Copy files.
  54.  
  55.    a) Copy EasyTime.cmd and EasyLoad.cmd to your maximus directory
  56.   
  57. 2) Edit Files.
  58.  
  59.    a) Edit your EasyTime.cmd configuration (first lines of file).
  60.  
  61.       i) Paths and Filenames. (include full paths! and BE ACCURATE!!!)
  62.  
  63.          LogFile: Should be your binkley.log file.
  64.  
  65.          FlagFile: File that tells the script if the program is "loaded" or not.
  66.                   If "loaded", it will reset the cpu time with the next BBS 
  67.                   caller. MUST be the same as specified in EasyLoad.cmd!
  68.  
  69.          EasyOnLog: File where records of time-resetting are kept. Can be the 
  70.                   same as used for EasyOn.
  71.  
  72.       ii) Options
  73.  
  74.          LogTimeChange: If enabled, will log changes to system time.
  75.  
  76.       iii) Other
  77.  
  78.          TimeZone: Offset from local time (±23 hrs) in full hours only (sorry 
  79.                   Newfoundland). This will have to be re-set as the local time 
  80.                   changes to daylight savings and back. (No problem if always 
  81.                   set to 0 (local time). Positive values should omit the "+"
  82.                   sign.
  83.  
  84.          DateString: The string returned from your modem that precedes the 
  85.                   date ("Date =" on the Supra). The date must be in the form
  86.                   "mmdd".  I don't know how standard this is.
  87.  
  88.          TimeString: The string returned from your modem that precedes the
  89.                   time ("Time =" on the Supra). The date must be in the form
  90.                   "hhmm".  Again, I don't know how standard this is
  91.  
  92.          ConnectString: A string that is ALWAYS in your LogFile (Binkley.Log),
  93.                   and located, AFTER the caller-id info.  This is used as an
  94.                   error checking tool to ensure that if caller-id is disabled 
  95.                   for some reason, then the information won't be used.
  96.  
  97.                   Note: I made mine "Connect " (note the space to differentiate 
  98.                         from "Connection"
  99.  
  100.    b) Edit your EasyLoad.cmd configuration (first lines of file).
  101.  
  102.       i) Paths and Filenames. (include full paths! and BE ACCURATE!!!)
  103.  
  104.  
  105.          FlagFile: File that tells the script if the program is "loaded" or not.
  106.                   If "loaded", it will reset the cpu time with the next BBS
  107.                   caller. MUST be the same as specified in EasyTime.cmd!
  108.  
  109.  
  110.  
  111.    b) Edit your SpawnBBS.cmd
  112.  
  113.       example (where CmdFile = "[path]\maxp\EasyBBS.cmd")
  114.  
  115.  
  116.         cd\maxp
  117.         call EasyTime.cmd
  118.         call EasyOn.cmd %1 %2 %3 %4 %5 %6 %7 %8 %9
  119.         call EasyBBS.CMD
  120.  
  121. rem Max loading without EasyOn
  122. rem maxp -b%2 -p%3 -t%4 -s%1 -n2 -lLine2.log -z\pipe\snoop2
  123.  
  124.      [rest deleted]
  125.  
  126.    c) Edit your binkley.cfg
  127.  
  128.       Edit the Answer line (if necessary) so that your modem answers incoming
  129.       calls AFTER the second ring. The caller-id information is received
  130.       between the first and second rings. You can play with this string, but
  131.       after fiddling a bit, I found putting "~~~" before the "ATA worked.
  132.       Two ~'s only worked some of the time, three ~'s worked everytime.
  133.       I also played with the "S0" register, but didn't have much success.
  134.  
  135.  
  136.    d) Edit your Binkley.cmd
  137.  
  138.       In one of your routines, (weekly, monthly or whatever) place the line:
  139.  
  140.       call EasyLoad.cmd
  141.  
  142.  
  143.       When this is run, it will change the flag-file to a "loaded" state, and
  144.       prepare EasyTime to re-set the system clock with the next caller to your 
  145.       BBS.
  146.  
  147.  
  148. You're done!!
  149.  
  150. Notes:
  151.  
  152.    You can run EasyLoad from the command line no problem, but if you try to 
  153.    run EasyTime while LogFile is pointing to a file in use, it won't run.
  154.    If you want to test it, copy your Binkley.log to another directory, and edit 
  155.    the configuration to point to it. (Make sure you run EasyLoad first.)
  156.  
  157.    I tried to work out my logic properly, and covered changes of overlapping
  158.    days/months and years (even leap years).  (I had to use system year, as 
  159.    caller-id doesn't provide this information....)
  160.  
  161.    Because caller-id doesn't return "seconds", I use :30 to split the 
  162.    difference.
  163.  
  164.    If you want to have the time-zone set "automatically", make a couple copies
  165.    of EasyTime.cmd (EasyTimS.cmd and EasyTimD.cmd for standard and daylight 
  166.    savings respectively) and have the appropriate time-zone set in each.  Then, 
  167.    you can edit your Binkley.log and Binkley.evt files so that on the day that
  168.    daylight savings comes into effect, you exit to an errorlevel that calls the
  169.    line "copy EasyTimD.cmd EasyTime.cmd" and on the day that it reverts back 
  170.    to standard time, "copy EasyTimS.cmd EasyTIme.cmd".
  171.  
  172.