From e731c61480aab83572bd4ad2cc6597f6d337965b Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 15 Sep 2013 16:45:38 +0100 Subject: [PATCH] Lua get_get_current_recipient --- src/plugins/lua_api.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/plugins/lua_api.c b/src/plugins/lua_api.c index 040d43ad..4e210309 100644 --- a/src/plugins/lua_api.c +++ b/src/plugins/lua_api.c @@ -113,15 +113,15 @@ lua_api_send_line(lua_State *L) static int lua_api_get_current_recipient(lua_State *L) { -/* - char *recipient = api_get_current_recipient(); + const char *recipient = api_get_current_recipient(); + if (recipient != NULL) { - return Py_BuildValue("s", recipient); + lua_pushstring(L, recipient); } else { - return Py_BuildValue(""); + lua_pushnil(L); } -*/ - return 0; + + return 1; } static int