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

Method run_command

library/RemoteClient.cpp:267–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267command_result RemoteClient::run_command(color_ostream &out, const std::string &cmd,
268 const std::vector<std::string> &args)
269{
270 if (!active || !socket->IsSocketValid())
271 {
272 out.printerr("In RunCommand: client connection not valid.\n");
273 return CR_FAILURE;
274 }
275
276 runcmd_call.reset();
277
278 runcmd_call.in()->set_command(cmd);
279 for (size_t i = 0; i < args.size(); i++)
280 runcmd_call.in()->add_arguments(args[i]);
281
282 return runcmd_call(out);
283}
284
285int RemoteClient::suspend_game()
286{

Callers 1

mainFunction · 0.80

Calls 3

resetMethod · 0.45
inMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected