mirror of
https://github.com/matrix-construct/construct
synced 2024-11-26 08:42:34 +01:00
construct: Ensure console_termstop executes in ctx.
This commit is contained in:
parent
63d77c2392
commit
024912d072
1 changed files with 17 additions and 2 deletions
|
@ -162,8 +162,8 @@ const char *const termstop_message
|
|||
*** This is a client and your commands will originate from the server itself.
|
||||
***)"};
|
||||
|
||||
void
|
||||
console_termstop()
|
||||
static void
|
||||
_console_termstop()
|
||||
try
|
||||
{
|
||||
const unwind atexit([]
|
||||
|
@ -194,6 +194,21 @@ catch(const std::exception &e)
|
|||
};
|
||||
}
|
||||
|
||||
void
|
||||
console_termstop()
|
||||
{
|
||||
if(ctx::current)
|
||||
return _console_termstop();
|
||||
|
||||
ircd::context
|
||||
{
|
||||
"console",
|
||||
stack_sz,
|
||||
_console_termstop,
|
||||
ircd::context::DETACH
|
||||
};
|
||||
}
|
||||
|
||||
void
|
||||
execute(const std::vector<std::string> lines)
|
||||
try
|
||||
|
|
Loading…
Reference in a new issue