summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Pamment <apamment@yandex.com>2018-11-03 17:33:04 +1000
committerAndrew Pamment <apamment@yandex.com>2018-11-03 17:33:04 +1000
commit27f0c26e29d2e129d2220b9460ad462673b3db82 (patch)
tree2fe782978f74c8cfebe7c605979d9ef8eaf413d1
parent13dd9353519046574101f4e1fd7105ae538431a3 (diff)
add location to lua_glue
-rw-r--r--src/lua_glue.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua_glue.c b/src/lua_glue.c
index 7100451..dfab524 100644
--- a/src/lua_glue.c
+++ b/src/lua_glue.c
@@ -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);