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

Method getPluginByCommand

library/PluginManager.cpp:1024–1032  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022}
1023
1024Plugin *PluginManager::getPluginByCommand(const std::string &command)
1025{
1026 std::lock_guard<std::mutex> lock{*cmdlist_mutex};
1027 std::map <string, Plugin *>::iterator iter = command_map.find(command);
1028 if (iter != command_map.end())
1029 return iter->second;
1030 else
1031 return NULL;
1032}
1033
1034// FIXME: handle name collisions...
1035command_result PluginManager::InvokeCommand(color_ostream &out, const std::string & command, std::vector <std::string> & parameters)

Callers 2

typeMethod · 0.80
getPluginCommandFunction · 0.80

Calls 2

findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected