summaryrefslogtreecommitdiff
path: root/src/script/cpp_api/s_base.h
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2021-08-28 12:15:12 +0200
committerGitHub <noreply@github.com>2021-08-28 12:15:12 +0200
commit6a1424f2b18520f40ba8cfd12f7988f6b33db9a6 (patch)
tree081e49b5f47693cddae8ba6c921cb6c3041b7731 /src/script/cpp_api/s_base.h
parent0f8a6d78a72731833664b09695bd44471bc014ac (diff)
downloadminetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.tar.gz
minetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.tar.bz2
minetest-6a1424f2b18520f40ba8cfd12f7988f6b33db9a6.zip
Async-related script cleanups
Diffstat (limited to 'src/script/cpp_api/s_base.h')
-rw-r--r--src/script/cpp_api/s_base.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/script/cpp_api/s_base.h b/src/script/cpp_api/s_base.h
index 86f7f7bac..7a8ebc85a 100644
--- a/src/script/cpp_api/s_base.h
+++ b/src/script/cpp_api/s_base.h
@@ -39,7 +39,6 @@ extern "C" {
#include "config.h"
#define SCRIPTAPI_LOCK_DEBUG
-#define SCRIPTAPI_DEBUG
// MUST be an invalid mod name so that mods can't
// use that name to bypass security!
@@ -108,7 +107,9 @@ public:
Client* getClient();
#endif
- std::string getOrigin() { return m_last_run_mod; }
+ // IMPORTANT: these cannot be used for any security-related uses, they exist
+ // only to enrich error messages
+ const std::string &getOrigin() { return m_last_run_mod; }
void setOriginDirect(const char *origin);
void setOriginFromTableRaw(int index, const char *fxn);