mirror of
https://github.com/matrix-construct/construct
synced 2024-10-03 06:08:52 +02:00
modules/console: Command to load a module that isn't already loaded.
This commit is contained in:
parent
f01fdc0528
commit
fc212e8399
1 changed files with 18 additions and 0 deletions
|
@ -461,6 +461,24 @@ console_cmd__mod__reload(opt &out, const string_view &line)
|
||||||
return true;
|
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
|
// db
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue