add location to lua_glue

This commit is contained in:
Andrew Pamment 2018-11-03 17:33:04 +10:00
parent 13dd935351
commit 27f0c26e29

View File

@ -203,6 +203,12 @@ int l_getUserHandle(lua_State *L) {
return 1;
}
int l_getUserLocation(lua_State *L) {
lua_pushstring(L, gUser->location);
return 1;
}
int l_messageFound(lua_State *L) {
int conference = lua_tointeger(L, 1);
int area = lua_tointeger(L, 2);
@ -644,6 +650,8 @@ void lua_push_cfunctions(lua_State *L) {
lua_setglobal(L, "bbs_full_mail_scan");
lua_pushcfunction(L, l_getUserHandle);
lua_setglobal(L, "bbs_get_userhandle");
lua_pushcfunction(L, l_getUserLocation);
lua_setglobal(L, "bbs_get_userlocation");
lua_pushcfunction(L, l_messageFound);
lua_setglobal(L, "bbs_message_found");
lua_pushcfunction(L, l_readMessageHdr);