diff options
Diffstat (limited to 'src/script/lua_api/l_client.cpp')
-rw-r--r-- | src/script/lua_api/l_client.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/lua_api/l_client.cpp b/src/script/lua_api/l_client.cpp index 458c1d1f4..0f4d7eaae 100644 --- a/src/script/lua_api/l_client.cpp +++ b/src/script/lua_api/l_client.cpp @@ -234,6 +234,13 @@ int ModApiClient::l_sound_stop(lua_State *L) return 0; } +// get_protocol_version() +int ModApiClient::l_get_protocol_version(lua_State *L) +{ + lua_pushinteger(L, getClient(L)->getProtoVersion()); + return 1; +} + void ModApiClient::Initialize(lua_State *L, int top) { API_FCT(get_current_modname); @@ -251,4 +258,5 @@ void ModApiClient::Initialize(lua_State *L, int top) API_FCT(get_meta); API_FCT(sound_play); API_FCT(sound_stop); + API_FCT(get_protocol_version); } |