summaryrefslogtreecommitdiff
path: root/src/cat/LuaScriptInterface.cpp
diff options
context:
space:
mode:
authorjacob1 <jfu614@gmail.com>2013-05-04 23:12:24 (GMT)
committer jacob1 <jfu614@gmail.com>2013-05-04 23:12:24 (GMT)
commit73fe68a3eb336bac2b76c70ec659bb0fd10df8c1 (patch)
tree571c05f31ec1ab7fd35ea07fc42caeb5fa575339 /src/cat/LuaScriptInterface.cpp
parent48c7d8a9169dec7179b2c086da1b9c131d6e354b (diff)
parent69bf9e1058494bc78c620c9cd9a90cb2bc4f31bc (diff)
downloadpowder-73fe68a3eb336bac2b76c70ec659bb0fd10df8c1.zip
powder-73fe68a3eb336bac2b76c70ec659bb0fd10df8c1.tar.gz
Merge pull request #133 from mniip/lua
Fix the luaopen_socket_core loader
Diffstat (limited to 'src/cat/LuaScriptInterface.cpp')
-rw-r--r--src/cat/LuaScriptInterface.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cat/LuaScriptInterface.cpp b/src/cat/LuaScriptInterface.cpp
index 0331717..d760ae3 100644
--- a/src/cat/LuaScriptInterface.cpp
+++ b/src/cat/LuaScriptInterface.cpp
@@ -95,6 +95,15 @@ LuaScriptInterface::LuaScriptInterface(GameController * c, GameModel * m):
luaL_openlibs(l);
luaopen_bit(l);
luaopen_socket_core(l);
+ lua_getglobal(l, "package");
+ lua_pushstring(l, "loaded");
+ lua_rawget(l, -2);
+ lua_pushstring(l, "socket");
+ lua_rawget(l, -2);
+ lua_pushstring(l, "socket.core");
+ lua_pushvalue(l, -2);
+ lua_rawset(l, -4);
+ lua_pop(l, 3);
luaopen_socket(l);
lua_pushstring(l, "Luacon_ci");