autorun.cmd
1 /* REXX */ 2 /* Note: This is an example Autorun REXX Script for use with OS/2 and 3 CircleMUD. You may use it as is, or as the basis for your own 4 script. 5 April 18, 1996 - David A. Carver */ 6 7 /* CircleMUD autorun script 8 * Originally by Fred C. Merkel 9 * Copyright (c) 1993 The Trustees of The Johns Hopkins University 10 * All Rights Reserved 11 * See license.doc for more information 12 * 13 * If .fastboot exists, the script will sleep for only 5 seconds between 14 * reboot attempts. If .killscript exists, the script commit suicide (and 15 * remove .killscript). If pause exists, the script will repeatedly sleep for 16 * 60 seconds and will not restart the mud until pause is removed. 17 */ 18 19 'echo off' 20 21 PORT=4000 22 FLAGS='' 23 24 call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs" 25 call SysLoadFuncs 26 27 Do forever 28 call SysCls 29 say center('CrapWeasel MUD',79) 30 say center('AutoRun Procedure',79) 31 'del syslog' 32 Say "AutoRun starting game " || DATE() 33 "set EMXOPT=-h150" 34 35 "bin\circle " FLAGS PORT || " >> syslog" 36 37 38 say 'Extracting little log information' 39 'del log\*.* /n' 40 'fgrep -w "self-delete" syslog >> log/delete' 41 'fgrep -w "death trap" syslog >> log/dts' 42 'fgrep -w "killed" syslog >> log/rip' 43 'fgrep -w "Running" syslog >> log/restarts' 44 'fgrep -w "advanced" syslog >> log/levels' 45 'fgrep -w "equipment lost" syslog >> log/rentgone' 46 'fgrep -w "usage" syslog >> log/usage' 47 'fgrep -w "olc" syslog >> log/olc' 48 'fgrep -w "new player" syslog >> log/newplayers' 49 'fgrep -w "SYSERR" syslog >> log/errors' 50 'fgrep -w "(GC)" syslog >> log/godcmds' 51 'fgrep -w "Bad PW" syslog >> log/badpws' 52 'fgrep -w "has connected" syslog >> log/whocon' 53 54 Do while stream("pause","c","query exists")<>"" 55 Say "Pausing..." 56 Call SysSleep(10) 57 end 58 59 if (stream("fastboot","c","query exists")="") then do 60 Say "Waiting 40 seconds to reboot" 61 Call SysSleep(40) 62 end 63 else do 64 "del fastboot" 65 Say "Waiting 5 seconds to reboot" 66 Call SysSleep(5) 67 end 68 69 if (stream("killscr","c","query exists")<>"") then do 70 Say "Exiting autorun" 71 "echo autoscript killed "DATE() ">> syslog" 72 "del killscr" 73 exit 74 end 75 end