diff options
Diffstat (limited to 'src/server.cpp')
-rw-r--r-- | src/server.cpp | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/server.cpp b/src/server.cpp index ed99a7214..288f254ed 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -294,9 +294,6 @@ Server::Server( errorstream << std::endl; } - // Path to builtin.lua - std::string builtinpath = getBuiltinLuaPath() + DIR_DELIM + "builtin.lua"; - // Lock environment JMutexAutoLock envlock(m_env_mutex); @@ -305,16 +302,13 @@ Server::Server( m_script = new GameScripting(this); + std::string scriptpath = getBuiltinLuaPath() + DIR_DELIM "init.lua"; - // Load and run builtin.lua - infostream<<"Server: Loading builtin.lua [\"" - <<builtinpath<<"\"]"<<std::endl; - bool success = m_script->loadMod(builtinpath, "__builtin"); - if(!success){ - errorstream<<"Server: Failed to load and run " - <<builtinpath<<std::endl; - throw ModError("Failed to load and run "+builtinpath); + if (!m_script->loadScript(scriptpath)) { + throw ModError("Failed to load and run " + scriptpath); } + + // Print 'em infostream<<"Server: Loading mods: "; for(std::vector<ModSpec>::iterator i = m_mods.begin(); |