This function sets a (previously created) session to be available for other users to join through the system UI. A user only has one joinable session at once, and when they leave the session (or the session ends) this will be cleared, however you can clear it manually by passing -1 in for the session argument.
Argument Description local_user The local user ID pointer. session_that_is_joinable The session ID to make joinable, or -1.
if global.session_ID != -1
The above code checks for a valid session ID value, and if one is detected it sets the session to be joinable.