]> jfr.im git - irc/quakenet/newserv.git/blobdiff - lua/lua.h
Lua version now excludes "Lua engine", at least for MODULEVERSION.
[irc/quakenet/newserv.git] / lua / lua.h
index 05f92740cbf8c0c359985c32612c1a6aa9f10dc1..35e96b8793b16580faa39b073d9a517391c0d35a 100644 (file)
--- a/lua/lua.h
+++ b/lua/lua.h
 #include <unistd.h>
 
 #include "../lib/sstring.h"
+#include "../core/nsmalloc.h"
 
 #include "lualocal.h"
+#include "luasocket.h"
+
+#define luamalloc(x) nsmalloc(POOL_LUA, x)
+#define luarealloc(x, y) nsrealloc(POOL_LUA, x, y)
+#define luafree(x) nsfree(POOL_LUA, x)
 
 /*** defines ************************************/
 
-#define LUA_BOTVERSION "1.75"
-#define LUA_CHANFIXBOT "Z"
+#define LUA_BOTVERSION "1.88"
+#define LUA_CHANFIXBOT "D"
 #define LUA_OPERCHAN "#twilightzone"
 
 #ifndef LUA_PUKECHAN
@@ -42,7 +48,8 @@
 #define LUA_AUXVERSION ""
 #endif
 
-#define LUA_FULLVERSION "Lua engine v" LUA_BOTVERSION " (" LUA_VERSION LUA_AUXVERSION ")"
+#define LUA_SMALLVERSION "v" LUA_BOTVERSION " (" LUA_VERSION LUA_AUXVERSION ")"
+#define LUA_FULLVERSION "Lua engine " LUA_SMALLVERSION
 
 /*** end defines ************************************/
 
@@ -54,6 +61,7 @@ typedef struct lua_list {
   struct lua_list *next;
   struct lua_list *prev;
   lua_localnick *nicks;
+  lua_socket *sockets;
 } lua_list;
 
 #define LUA_STARTLOOP(l) { lua_list *ll; for(ll=lua_head;ll;ll=ll->next) {  l = ll->l
@@ -69,6 +77,7 @@ lua_State *lua_loadscript(char *file);
 void lua_unloadscript(lua_list *l);
 lua_list *lua_scriptloaded(char *name);
 lua_list *lua_listfromstate(lua_State *l);
+int lua_listexists(lua_list *l);
 int lua_lineok(const char *data);
 
 #define lua_toint(l, n) (int)lua_tonumber(l, n)
@@ -78,6 +87,9 @@ int lua_lineok(const char *data);
 #define lua_tolong(l, n) (long)lua_tonumber(l, n)
 #define lua_islong(l, n) lua_isnumber(l, n)
 #define lua_pushlong(l, n) lua_pushnumber(l, n)
+#define lua_pushnumeric(l, n) lua_pushlong(l, n)
+#define lua_tonumeric(l, n) lua_tolong(l, n)
+#define lua_isnumeric(l, n) lua_islong(l, n)
 
 extern struct rusage r_usages;
 extern struct rusage r_usagee;