From b8a4c62c499af70443481242873c269daacae34d Mon Sep 17 00:00:00 2001 From: Someone Date: Sat, 30 Nov 2024 01:40:06 +0100 Subject: [PATCH] RELEASE 2.0.2 - More pcalls = more good --- changelog.txt | 7 +++++++ control.lua | 2 +- info.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index e0aa2d1..da3c886 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,10 @@ +--------------------------------------------------------------------------------------------------- +Version: 2.0.2 +Date: 2024-11-30 + + Changed: + - More pcalls = more good. + --------------------------------------------------------------------------------------------------- Version: 2.0.1 Date: 2024-10-23 diff --git a/control.lua b/control.lua index c884a25..cf2f43f 100644 --- a/control.lua +++ b/control.lua @@ -13,7 +13,7 @@ function exec_command(player) cmd = storage.cmd or "" cmd = cmd:gsub('game%.player([^s])', 'game.players['..player.index..']%1') - f, err = loadstring(cmd) + f, err = loadstring('pcall(function () '..cmd..' end)') if not f then cmd = 'game.players['..player.index..'].print('..cmd..')' f, err = loadstring(cmd) diff --git a/info.json b/info.json index 72bf03d..8775d79 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "some-luaconsole", - "version": "2.0.1", + "version": "2.0.2", "title": "Someone's LUA-Console", "author": "someone1337", "homepage": "https://git.somenet.org/factorio/some-luaconsole.git", -- 2.43.0