home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / gpm108b.zip / English / Events.CFG < prev    next >
Text File  |  2000-04-26  |  12KB  |  284 lines

  1. ;*===========================================================================*
  2. ;*   General Purpose Mailer. FTN-compatible Extended-Binkley-Style mailer    *
  3. ;*   for OS/2 Warp with multiline support and Presentation Manager GUI.      *
  4. ;*   Written by Igor Vanin (2:5030/448@fidonet, vanin@gpmail.spb.ru)         *
  5. ;*===========================================================================*
  6. ;*                        Events and Processes setup                         *
  7. ;*===========================================================================*
  8.  
  9. ;      Instructions for Outbound and Event Manager start with "Event" and
  10. ; "Process" keywords. The Event Manager works in parallel with other mailer
  11. ; activities, so that all commands are executed on schedule with no delays.
  12. ;
  13. ;      Process is an action performed under certain conditions, for example
  14. ; after receiving echomail or after session is finished. Processes are defined
  15. ; with strings like:
  16. ;
  17. ; Process [<when>] <condition> <action>
  18. ;
  19. ;      <Action> field defines an action. Available actions are below.
  20. ;
  21. ;      <Condition> field defines condition, under which the process is started.
  22. ; It may have the following values:
  23. ;
  24. ; *) Startup         -- started once upon mailer start up.
  25. ;
  26. ; *) Arcmail         -- started after receiving echomail.
  27. ;
  28. ; *) Netmail         -- started after receiving uncompressed netmail (*.PKT files).
  29. ;
  30. ; *) Mail            -- started after receiving echomail or uncompressed netmail
  31. ;                       (may be used instead of Arcmail and Netmail).
  32. ;
  33. ; *) TIC             -- started after receiving *.TIC files, which accompany
  34. ;                       files from fileechoes.
  35. ;
  36. ; *) Session         -- started after session is over.
  37. ;
  38. ; *) File <filename> -- started after receiving <filename> file.
  39. ;                       ('?' and '*' wildcards are allowed)
  40. ;
  41. ; *) BBS             -- started when BBS is requested.
  42. ;
  43. ; *) NoModem         -- started if modem initialization was unsuccessful.
  44. ;
  45. ; *) Flag <flagname> -- started when <flagname> file appeared on disk. This file
  46. ;                       is deleted after starting the process. Flag files are
  47. ;                       checked once a minute.
  48. ;
  49. ; *) ModemSays <keyword> -- started if <keyword> modem response is received while
  50. ;                       waiting for a call or connect. After the process is
  51. ;                       finished, mailer operates in ordinary way.
  52. ;
  53. ; *) External In <string> -- started if <string> is received from remote
  54. ;                       during handshake (so called external mailer). This
  55. ;                       action is performed instead of the FTN-session.
  56. ;
  57. ; *) External Out <addr_list> -- started after connecting to an address from the
  58. ;                       <addr_list>. If an external process is started with
  59. ;                       action and errorlevel <> 0 is returned, then the poll
  60. ;                       for this address is removed.
  61. ;
  62. ; *) View           --  started for viewing a file from the Outbound Editor.
  63. ;                       For example you may place the "Exec" command here.
  64. ;                       The filename is specified by the *F macro.
  65. ;
  66. ;
  67. ;      For certain processes the <when> field may be defined. It can be set to
  68. ; "After", "Online" or "Immediate". For processes like Arcmail, Netmail, TIC or
  69. ; File <filename> they mean the following:
  70. ;
  71. ; *) After     -- the command is executed only after the session is completed;
  72. ; *) Online    -- the command is executed after all files are received;
  73. ; *) Immediate -- the command is executed immediately after receiving a file
  74. ;                 of the specified type.
  75. ;
  76. ;      For the "Session" Process the "Immediate" modifier means that the command
  77. ; must be executed before session is started rather than after it is completed.
  78. ;
  79. ;      For starting the BBS you may fill the <when> field with "Online" or
  80. ; "Immediate" in the "Process BBS" string, or simply leave this field out.
  81. ; "Process After BBS" defines an action which is performed after the BBS is
  82. ; terminated.
  83. ;
  84. ;      For the "Flag" process the "Immediate" modifier means that the appearance
  85. ; of this flag is checked every second rather than every minute. Using this
  86. ; feature is not recommended because of frequent disk scanning.
  87. ;
  88. ;      Instead of the long "Immediate" modifier you may use its shorter
  89. ; equivalent -- "Imm".
  90. ;
  91. ;
  92. ;      Event is an action performed by mailer at specific time. Events are
  93. ; defined with strings like:
  94. ;
  95. ; Event <time> <action>
  96. ;
  97. ;      The <time> field sets the time when the event must be executed.
  98. ; The syntax for defining time variables is described in the "Time definition"
  99. ; Chapter.
  100. ;
  101. ;      The <action> field defines an action. It may have the same values as
  102. ; in "Process" commands. Note that some commands have effect on all mailer
  103. ; windows while others only affect modem lines. If you want to define an action
  104. ; for a particular modem line, put the number of this line in square brackets
  105. ; before the "Event" string. Otherwise the event is executed for all modem lines.
  106. ; The description of available actions follows.
  107. ;
  108. ; *) Rescan
  109. ;    Rescans outbound and builds the outbound queue.
  110. ;
  111. ; *) ReadConfig
  112. ;    Rereads configuration files.
  113. ;
  114. ; *) Poll <prio> <address>
  115. ;    Creates poll for specified addresses with <prio> priority (0..9).
  116. ;    Several addresses separated by spaces may be defined.
  117. ;
  118. ; *) RemovePoll <address>
  119. ;    If a poll for the <address> exists, it will be removed.
  120. ;    Several addresses separated by spaces may be defined.
  121. ;
  122. ; *) Set <var> <value>
  123. ;    Sets the <var> variable to <value>. This command may be executed globally
  124. ;    or for specified modem lines.
  125. ;
  126. ; *) Log <string>
  127. ;    Puts the <string> into log. If you use separate log files for Outbound and
  128. ;    Event Manager and modem lines, then the string is written into Manager log
  129. ;    unless you specify a line number as described above.
  130. ;
  131. ; *) Create <flagname>
  132. ;    Creates a zero-length file named  <flagname>. If this file already exists,
  133. ;    it is freshened: its date and time are set to current date and time. If the
  134. ;    full path is not defined, the file is created in the Flag_Dir directory.
  135. ;
  136. ; *) RemoveFile <filename>
  137. ;    If the <filename> file exists on disk, it is removed. If the full path is
  138. ;    not defined, the file is searched in the Flag_Dir directory.
  139. ;
  140. ; *) Exit <errorlevel>
  141. ;    Terminates mailer with error level <errorlevel>.
  142. ;
  143. ; *) Hangup
  144. ;    Goes on hook and breaks current connection (if On-Line).
  145. ;
  146. ; *) InitModem
  147. ;    Initializes modem (if it is not busy).
  148. ;
  149. ; *) SendModem <string>
  150. ;    Sends <string> to modem. This command is executed only if the line is not
  151. ;    busy.
  152. ;
  153. ; *) Pause
  154. ;    Activates Pause mode.
  155. ;
  156. ; *) Unpause
  157. ;    Disables Pause mode, return to normal operation.
  158. ;
  159. ; *) Create_FileIndex
  160. ;    Creates file index, that is used for faster file requests processing.
  161. ;    Index file contains all files from FreqDir and FreqTree variables.
  162. ;    File index is used if enabled by Use_FileIndex keyword.
  163. ;
  164. ; *) ResetTries <addr>
  165. ;    Resets tries counter for address <addr>
  166. ;
  167. ; *) SetHold <time> <addr>
  168. ;    Sets Hold flag for address <addr> valid during <time> (in minutes).
  169. ;    If <time> is set to 0, the flag is set forever.
  170. ;
  171. ; *) RemoveHold <addr>
  172. ;    Removes Hold flag, if it is set for address <addr>
  173. ;
  174. ; *) SetImm <time> <addr>
  175. ;    Sets Imm flag for address <addr> valid during <time> (in minutes).
  176. ;    If <time> is set to 0, the flag is set forever.
  177. ;
  178. ; *) RemoveImm <addr>
  179. ;    Removes Imm flag, if it is set for address <addr>
  180. ;
  181. ; *) Play <filename>
  182. ;    Plays sound file <filename> though MMPM/2 interface (usually this is a
  183. ;    WAV-file)
  184. ;
  185. ; *) Sound <number of iterations> <4-digit patterns>
  186. ;    Plays sounds through PC Internal Speaker.
  187. ;    A pattern contains four digits:
  188. ;                       1 - frequency (Hz) (0 means silence)
  189. ;                       2 - frequency increment for 1 measure
  190. ;                       3 - duration of measure (ms)
  191. ;                       4 - number of measures
  192. ;    You may specify a letter (note) followed by a number (octave 1..7)
  193. ;    instead of frequency. A=la, B=si, æ=do, ..., G=sol.
  194. ;
  195. ; *) Exec <title> <modifiers> <progname> <param>
  196. ;    Executes the <progname> program with specified parameters. All types of
  197. ;    programs (OS/2 PM, OS/2 VIO, VDM, command files) may be run.
  198. ;    <title> defines the window title (for windowed programs) or the string in
  199. ;    tasklist (for fullscreen programs).
  200. ;    <modifiers> are modifiers for run method, which form a word from the
  201. ;    following characters:
  202. ;           F - Foreground;
  203. ;           B - Background;
  204. ;           W - Windowed;
  205. ;           V - Full Screen text mode;
  206. ;           X - Maximized (only for windowed programs);
  207. ;           N - Minimized (only for windowed programs);
  208. ;           Z - Wait until the process is finished;
  209. ;           C - Close port before running the program and wait until it is
  210. ;               finished. If modem is busy at the time, the event will be executed
  211. ;               when the line becomes free.
  212. ;               (this modifier may be used only in "Event" and "Process Flag"
  213. ;               command)
  214. ;
  215. ;    <param> is a word which defines command line parameters passed to the
  216. ;    program. It may be omitted if it is the last word in the string.
  217. ;
  218. ;      When setting the parameters for programs you may use macros that are
  219. ; substituted with certain values at run-time:
  220. ;
  221. ;    *A  - full address of the system;
  222. ;    *B  - connection speed (DCE baudrate);
  223. ;    *H  - time left until the end of period when BBS is available (in minutes);
  224. ;    *L  - fixed port speed (locked port);
  225. ;    *P  - COM-port number;
  226. ;    *T  - Line number;
  227. ;    *O  - open COM-port handle;
  228. ;    *FS - filename of the last sent file;
  229. ;    *FR - filename of the last received file;
  230. ;    **  - "*" character.
  231. ;
  232. ;      The <action>  field may contain several commands. The commands are
  233. ; separated by the "And" keyword.
  234. ;
  235. ;      If you should define the same actions for different events and processes,
  236. ; you may define them once and then refer to them by a short identifier.
  237. ; The "DefineAction" keyword is used for this purpose:
  238. ;
  239. ; DefineAction <id> <commands>
  240. ;
  241. ; <id>        - any word, an identifier for <commands>;
  242. ; <commands>  - any commands matching he syntax described in this chapter.
  243. ;
  244. ;      To execute a pre-defined action the "Action" keyword must be added to
  245. ; Manager instructions:
  246. ; Action <id>
  247. ; This keyword will execute the set of commands defined as <id>.
  248. ; Note that references from one action defined with "DefineAction" to others.
  249.  
  250. ; Examples:
  251.  
  252. Event 0:00 Log "New day! :-)"
  253.  
  254. ; Generate a poll to my uplinks 2:5030/251 and 2:5030/1016 (priority=8)
  255. ;Event 22:00,02:00,05:00,08:00,13:00,18:00 Poll 8 2:5030/251 2:5030/1016
  256.  
  257. ; Çfter receiving netmail:
  258. ;Process Imm    Netmail         Create C:\Net\Flags\NetMail.FLG
  259.  
  260. ; After receiving all files if echomail received:
  261. ;Process Online Arcmail Exec "Echo Tossing" BV C:\Net\Tosser\Toss.CMD "IN OUT"
  262.  
  263. ; After session, if the files specified were received:
  264. ;Process After  Tic             Exec "File Tosser" VB ALLFIX.EXE -nocrc
  265. ;Process After  File *.RI?      Log "FRIP mail came here!"
  266.  
  267. ; Two commands, separated by the "And" keyword:
  268. ;Process Flag Exit.FLG Log "Exit request detected" And Exit 100
  269.  
  270. ; BBS software execution
  271. ;Process BBS Exec "BBS on COM*P (*B baud)" "VBZ" "C:\Net\GPMail\BBS.CMD" "*B *L *O"
  272.  
  273. ; Running external fax-receiver:
  274. ;Process ModemSays "+FCO" {
  275. ;   Exec "Fax receiving" VBZ "C:\Net\Fax\BGFAX.CMD" *O
  276. ;   And Hangup
  277. ;}
  278.  
  279. ; External viewer for the Outbound Editor:
  280. ; Process View <command>
  281. ; The filename is specified by the *F macro.
  282. ;Process View Exec "Viewer" FW C:\NET\GPMail\Viewer.CMD *F
  283.  
  284.