add exclamation commands

This commit is contained in:
biglyderv 2025-04-11 23:11:22 -04:00
parent 16738d322b
commit 5e58deb712
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5

View file

@ -59,8 +59,14 @@ app.post('/', async function (req, res) {
let msgs = req.body.data.split('\n');
let msg = msgs[0];
if (msg.startsWith('!')) {
msg = `/${msg.slice(1)}`;
}
setTimeout(async function () {
sessions[id].stdin.write(msgs[0] + '\n');
sessions[id].stdin.write(msg + '\n');
}, 100);
});