some little fixes
This commit is contained in:
parent
f8393d44e7
commit
12b508fc9f
@ -41,9 +41,6 @@ ELSE
|
|||||||
ENDIF
|
ENDIF
|
||||||
UNSET errors
|
UNSET errors
|
||||||
|
|
||||||
// loads & applies the configuration
|
|
||||||
CONFIG
|
|
||||||
|
|
||||||
// Load some SCP files
|
// Load some SCP files
|
||||||
LOADALLSCP
|
LOADALLSCP
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,10 @@ LOGDETAIL * Dangerous variables removed.
|
|||||||
#script=config
|
#script=config
|
||||||
#permission=255
|
#permission=255
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
#onload
|
||||||
|
// create empty variable. stores if config script was already run successfully once.
|
||||||
|
SET,DONE
|
||||||
|
#/onload
|
||||||
// Load all conf files from directory /conf/
|
// Load all conf files from directory /conf/
|
||||||
// get all *.conf file names from /conf/ directory, store the names in list 'fl' and the amount in 'fcount'
|
// get all *.conf file names from /conf/ directory, store the names in list 'fl' and the amount in 'fcount'
|
||||||
LOG ** Configuring PseuWoW...
|
LOG ** Configuring PseuWoW...
|
||||||
@ -84,6 +88,7 @@ INTERNAL_PERM
|
|||||||
DEFAULT,#CMDCHAR .
|
DEFAULT,#CMDCHAR .
|
||||||
|
|
||||||
LOG ** All Config done.
|
LOG ** All Config done.
|
||||||
|
SET,DONE true
|
||||||
|
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -98,3 +103,16 @@ LOG * Assigning permissions for internal functions...
|
|||||||
setscriptpermission,emote 0
|
setscriptpermission,emote 0
|
||||||
// ... set more permissions here ...
|
// ... set more permissions here ...
|
||||||
|
|
||||||
|
|
||||||
|
// this dummy script does nothing actually but since its loaded last in this file it causes the config
|
||||||
|
// script to be run before all .def files are loaded
|
||||||
|
// (this is important for scripts that depend on the config already existing during load-time)
|
||||||
|
//-------------------------------------------------
|
||||||
|
#script=dummy
|
||||||
|
//-------------------------------------------------
|
||||||
|
#onload
|
||||||
|
if ?{not ${#config::DONE}}
|
||||||
|
config
|
||||||
|
endif
|
||||||
|
#/onload
|
||||||
|
|
||||||
|
|||||||
@ -252,7 +252,10 @@ bool DefScriptPackage::LoadScriptFromFile(std::string fn){
|
|||||||
curScript->SetDebug(true);
|
curScript->SetDebug(true);
|
||||||
}
|
}
|
||||||
else if(line=="onload")
|
else if(line=="onload")
|
||||||
Script[SN_ONLOAD] = curScript = new DefScript(this);
|
{
|
||||||
|
_UpdateOrCreateScriptByName(SN_ONLOAD);
|
||||||
|
curScript=Script[SN_ONLOAD];
|
||||||
|
}
|
||||||
else if(line=="endonload" || line=="/onload")
|
else if(line=="endonload" || line=="/onload")
|
||||||
{
|
{
|
||||||
RunScript(SN_ONLOAD,NULL,sn);
|
RunScript(SN_ONLOAD,NULL,sn);
|
||||||
|
|||||||
@ -347,8 +347,10 @@ void PseuInstance::DeleteGUI(void)
|
|||||||
PseuInstanceConf::PseuInstanceConf()
|
PseuInstanceConf::PseuInstanceConf()
|
||||||
{
|
{
|
||||||
enablecli=false;
|
enablecli=false;
|
||||||
|
enablegui=false;
|
||||||
exitonerror=false;
|
exitonerror=false;
|
||||||
debug=0;
|
debug=0;
|
||||||
|
rmcontrolport=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PseuInstanceConf::ApplyFromVarSet(VarSet &v)
|
void PseuInstanceConf::ApplyFromVarSet(VarSet &v)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user