0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 21:59:02 +02:00

modules/console: Command to load a module that isn't already loaded.

This commit is contained in:
Jason Volk 2018-03-28 00:13:32 -07:00
parent f01fdc0528
commit fc212e8399

View file

@ -461,6 +461,24 @@ console_cmd__mod__reload(opt &out, const string_view &line)
return true;
}
bool
console_cmd__mod__load(opt &out, const string_view &line)
{
const std::string name
{
token(line, ' ', 0)
};
if(m::modules.find(name) != end(m::modules))
{
out << name << " is already loaded." << std::endl;
return true;
}
m::modules.emplace(name, name);
return true;
}
//
// db
//