MINOR: hlua_fcn: add Server.tracking()

This function returns the currently tracked server, if any.
This commit is contained in:
Aurelien DARRAGON
2023-03-29 11:30:36 +02:00
committed by Christopher Faulet
parent 7a03dee36f
commit 406511a2df
2 changed files with 30 additions and 0 deletions

View File

@@ -1337,6 +1337,15 @@ Server class
:param class_server sv: A :ref:`server_class` which indicates the manipulated
server.
.. js:function:: Server.tracking(sv)
Check if the current server is tracking another server.
:param class_server sv: A :ref:`server_class` which indicates the manipulated
server.
:returns: A :ref:`server_class` which indicates the tracked server or nil if
the server doesn't track another one.
.. js:function:: Server.event_sub(sv, event_types, func)
Register a function that will be called on specific server events.