getConnectedUsers function


getConnectedUsers

getConnectedUsers () getConnectedUsers returns an array of users connected to the current server.

Parameters:

This function does not take any parameters.

Returns:

An array of strings containing the user names of those logged in to viewers connected to the current server.

Example

// This function sends an alert to a single user. If that user
// is not logged in, an alert is sent to everyone

function sendAlert(user, message)

users = getConnectedUsers()
found = false
do i = 0 to users.size() - 1
    if user == users[i] then
        found = true
        sendAlertToUser(user, message, 60)
    endif
end
if found == false then
// Send a message indicating the desired operator is not logged in
    sendAlertToAllViewers("User " & user & " not logged in. Message is " & message, 60)
endif
return false

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*