From 919e3ed0e242208290f358c172338c5515004ffe Mon Sep 17 00:00:00 2001
From: wolfy852 <wolfy852@hotmail.com>
Date: Wed, 1 Jun 2016 21:06:24 -0500
Subject: [PATCH] Make token available to Lua as a global variable

Reviewed by @RedEnchilada
---
 src/dehacked.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/dehacked.c b/src/dehacked.c
index 199ea43ca8..f7845af447 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -8276,6 +8276,9 @@ static inline int lib_getenum(lua_State *L)
 	} else if (fastcmp(word,"VERSIONSTRING")) {
 		lua_pushstring(L, VERSIONSTRING);
 		return 1;
+	} else if (fastcmp(word, "token")) {
+		lua_pushinteger(L, token);
+		return 1;
 	}
 
 	return 0;
-- 
GitLab