1#!/usr/bin/env swipl
    2/* * module  MUD server startup script in SWI-Prolog
    3
    4?- 
    5 consult(library(prologmud_sample_games/run_mud_server)).
    6
    7
    8*/
    9% ==============================================
   10% INIT LOCAL DIR
   11% ==============================================
   12
   13%:- abolish(system:trace,0).
   14%:- asserta(system:trace).
   15% :- set_prolog_flag(encoding,text).
   16
   17:- '$set_typein_module'(baseKB).   18:- '$set_source_module'(baseKB).   19
   20:- prolog_load_context(directory,D),cd(D).   21
   22%:- if(current_prolog_flag(argv,[])).
   23%  sudo -u prologmud_server gdb -x gdbinit -return-child-result -ex "set pagination off" -ex run -ex quit --args swipl -l run_mud_server.pl --all --world --repl --lisp --lispsock --sumo --planner --nonet --repl --noworld
   24:- if(\+ ((current_prolog_flag(argv,X),member(E,X),atom_concat('--',_,E)))).   25:- current_prolog_flag('argv',WasArgV),
   26   append(WasArgV,[         
   27   '--','--all','--pdt','--world','--repl','--lisp','--lispsock','--sumo', '--planner',
   28   '--cliop','--sigma','--www', '--irc','--swish','--docs','--plweb',   
   29   % '--nonet' '--noworld',
   30   '--elfinder', '--defaults' ], NewArgV),
   31   set_prolog_flag('argv',NewArgV).   32
   33:- current_prolog_flag('argv',Is),writeq(set_prolog_flag('argv',Is)),!,nl.   34:- endif.   35%:- endif.
   36
   37:- use_module(library(prolog_pack)).   38:- multifile(user:file_search_path/2).   39:-   dynamic(user:file_search_path/2).   40
   41:- pack_list_installed.   42
   43:- ensure_loaded(library(nomic_mu)).   44% http://gitlab.logicmoo.org:3020/pldoc/pack/
   45:- asserta((pldoc_http:doc_enabled:-!)).   46
   47%e:- ensure_loaded(library(logicmoo_utils_all)).
   48
   49% ==============================================
   50% [Required] Load the Logicmoo User System
   51% ==============================================
   52:- ensure_loaded(library(logicmoo_lib)).   53
   54
   55% ==============================================
   56% ============= MUD SERVER CODE LOADING =============
   57% ==============================================
   58
   59:- baseKB:ensure_loaded(library(logicmoo_mud)).