When an object in Second Life talks to Moodle, it sends the details of the avatar using it. Moodle then finds out which Moodle user the avatar belongs to, and can be instructed only to allow access to particular users:
For example, if you are setting up a WebIntercom, you can prevent guests participating in it by setting the Server Access Level to "Course". Alternatively, you could restrict to teachers only by setting it to "Staff". (Note: this won't prevent users clicking on the WebIntercom... it will simply stop their chat messages reaching the Moodle chatroom.)