Closed CaptainZidgel closed 4 years ago
ocb is a module for encrypting UDP packets before sending them to the server. Technically it isn't needed, and can be stripped from the code rather easily since it will fall back to using TCP packets instead.
luaL_setmetatable is defined here in luajit: https://github.com/LuaJIT/LuaJIT/blob/f0e865dd4861520258299d0f2a56491bd9d602e1/src/lauxlib.h#L92
So I'm not entirely sure why this isn't defined for you. Are you using LuaJit-beta2.1?
Anyway, this definition should get it to compile for you.
#define luaL_setmetatable(L, tname) lua_getfield(L, LUA_REGISTRYINDEX, tname); lua_setmetatable(L, -2);
Ah, that would do it then. I'm still using Luajit 2.0.5. I didn't even know beta2.1 existed, which is kind of sad because it's right on Luajit's front page and I visit that every time I have to reinstall on a machine. The define statement worked quite well, thank you. ocb.so compiled and I can now start the bot. If I run into any more problems anywhere else I'll update to the latest Luajit beta.
Attempted to run with the provided ocb.so
Downloaded the required headers and attempted to use build.sh in
Lumble/ocb-aes128
in case the compiled ocb was outdated compared to the code.I don't know anything about C, the C API or what ocb is supposed to even do, but I attempted to resolve the issue by following the suggestion but it only created new errors.