mojo_client/bin/_startup.def
False.Genesis 4845888fc3 * compacted scripts. needs min rev 141 to run (skipping 'lsort'). deleted old scripts.
* added script func 'lsort'. more args will be added later.
2007-06-22 11:20:50 +00:00

45 lines
906 B
Modula-2

#permission=255
// PSEUWOW DEF_SCRIPT STARTUP FILE
LOG * DefScript StartUp [${@version_short}]...
// first, load all scripts in patch 'scripts' with extension .def
SET,fcount ?{LGETFILES,scriptlist,def scripts}
LSORT scriptlist
LOGDETAIL * Loading ${fcount} scripts.
// iterate over all files and load them; if counter i is equal to the amount of files we are done.
SET,i 0
LOOP
IF ?{EQUAL,${i} ${fcount}}
EXITLOOP
ENDIF
SET,fn ./scripts/?{LINDEX,scriptlist ${i}}
LOGDEBUG * Loading script file [${fn}]
IF ?{NOT ?{LOADDEF ${fn}}}
LOGERROR Can't load script [${fn}]
ENDIF
ADD,i 1
ENDLOOP
UNSET tmp
UNSET fcount
UNSET i
UNSET fn
LDELETE scriptlist
// loads & applies the configuration
CONFIG
// set permissions for internal functions
INTERNAL_PERM
// Load some SCP files
LOADALLSCP
// do more stuff here in future...
LOG * StartUp complete!