MCPcopy Create free account
hub / github.com/DFHack/dfhack / do_command

Function do_command

plugins/spectate.cpp:413–423  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411}
412
413static command_result do_command(color_ostream &out, vector<string> &parameters) {
414 bool show_help = false;
415 if (!Lua::CallLuaModuleFunction(out, "plugins.spectate", "parse_commandline", std::make_tuple(parameters),
416 1, [&](lua_State *L) {
417 show_help = !lua_toboolean(L, -1);
418 })) {
419 return CR_FAILURE;
420 }
421
422 return show_help ? CR_WRONG_USAGE : CR_OK;
423}
424
425/////////////////////////////////////////////////////
426// cycle logic

Callers

nothing calls this directly

Calls 2

CallLuaModuleFunctionFunction · 0.85
lua_tobooleanFunction · 0.85

Tested by

no test coverage detected