From dcabca0c1a599270c2f6c98941eabdb97c2d5c90 Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Thu, 3 Aug 2023 11:13:50 -0400 Subject: [PATCH] Remove the pebblisp code feature --- src/games/hvacoins/index.js | 44 ------------------------------------- 1 file changed, 44 deletions(-) diff --git a/src/games/hvacoins/index.js b/src/games/hvacoins/index.js index 94b6c23..ce99795 100644 --- a/src/games/hvacoins/index.js +++ b/src/games/hvacoins/index.js @@ -1677,50 +1677,6 @@ command( const exec = require('child_process').exec const { createReadStream } = require('fs') -command( - ['!pl'], - '!pl `code`\n\n' + - 'A very very stupid lisp implementation.', - async ({ event, say }) => { - return - let code = ' (def sys 0)'// = '(def iLoveHvacker "9jklFUlbnd38bCrrU9765FhN") ' - code += event.text.substring(4) - .replace(/`/g, '') - .replace(/</g, '<') - code += ' ' - // console.log('PL CODE:', code) - - //const fileName = '/home/sagevaillancourt/git/hvacker/pl/' + event.user + (new Date().toLocaleString().replace(/[^a-z0-9]/gi, '_')) - //fs.writeFileSync(fileName, code) - - const command = `/home/sagevaillancourt/projects/pebblisp/src/pl '${code}'` - console.log('pl command:', command) - const child = exec(command) - let result = '```\n' - let errors = '' - child.stdout.on('data', data => (result += data.replace(/\[\d+m/g, ''))) - child.stderr.on('data', data => { - result += `\nERR:${data}\n` - errors += `\nERR:${data}` - }) - const maxLines = 25 - const maxChar = 2000 - child.on('close', async () => { - // fs.rmSync(fileName) - const lines = result.split('\n') - let err = '\n' - if (lines.length > maxLines) { - result = lines.slice(0, maxLines).join('\n') + '\n...' - err += `Output exceeds ${maxLines} lines and was truncated.\n` - } - if (result.length > maxChar) { - result = result.substring(0, maxChar) - err += `\nOutput also exceeds ${maxChar} characters and was truncated further...\n` - } - result += '```' + err + (errors && 'stderr:\n```\n' + errors.substring(0, 200) + '```') - await say(result) - }) - }, adminOnly) command( ['!steal', '!sagesteal'],