MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / CommandProcessor

Method CommandProcessor

source/game/StarCommandProcessor.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25namespace Star {
26
27CommandProcessor::CommandProcessor(UniverseServer* universe, LuaRootPtr luaRoot)
28 : m_universe(universe) {
29 auto assets = Root::singleton().assets();
30 m_scriptComponent.addCallbacks("universe", LuaBindings::makeUniverseServerCallbacks(m_universe));
31 m_scriptComponent.addCallbacks("CommandProcessor", makeCommandCallbacks());
32 m_scriptComponent.setScripts(jsonToStringList(assets->json("/universe_server.config:commandProcessorScripts")));
33 luaRoot->luaEngine().setNullTerminated(false);
34 m_scriptComponent.setLuaRoot(luaRoot);
35 m_scriptComponent.init();
36}
37
38String CommandProcessor::adminCommand(String const& command, String const& argumentString) {
39 MutexLocker locker(m_mutex);

Callers

nothing calls this directly

Calls 9

singletonClass · 0.85
jsonToStringListFunction · 0.85
assetsMethod · 0.80
setScriptsMethod · 0.80
jsonMethod · 0.80
setNullTerminatedMethod · 0.80
setLuaRootMethod · 0.80
addCallbacksMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected