]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/lua.c
Lua version now excludes "Lua engine", at least for MODULEVERSION.
[irc/quakenet/newserv.git] / lua / lua.c
index a3d54f3b12359b20917256128f3e6fb5d606fa6e..7681bf62a1e2e83b81b9f274f70a42ad223273f9 100644 (file)
--- a/lua/lua.c
+++ b/lua/lua.c
@@ -14,7 +14,7 @@
 
 #include "lua.h"
 
-MODULE_VERSION(LUA_FULLVERSION);
+MODULE_VERSION(LUA_SMALLVERSION);
 
 #ifdef LUA_DEBUGSOCKET
 
@@ -260,6 +260,14 @@ lua_State *lua_loadscript(char *file) {
     Error("lua", ERR_ERROR, "Error pcalling: %s.", file);
     lua_close(l);
     freesstring(n->name);
+
+    if(lua_head == n)
+      lua_head = NULL;
+
+    lua_tail = n->prev;
+    if(lua_tail)
+      lua_tail->next = NULL;
+
     luafree(n);
     return NULL;
   }