SB_CHAT_LISTEN

From SmartBots Developers Docs
Jump to: navigation, search

Starts/stops listening to the group chat. Messages will come to you with SB_CHAT_MESSAGE event.

- Requires group chat monitoring to be enabled on your group

Variables

The following table shows input values (you send them with the API call) and returned output values.

Variable Required Description.
Syntax:
llMessageLinked( LINK_SET, SB_CHAT_LISTEN, string str, key id )
Input variables:
str yes 1 to start listening

0 to stop

id yes --

Comments

This command instructs AdminBot to start listening on the group chat. The group chat messages will be passed to your script using SB_CHAT_MESSAGE event.

Successfull connection

After connecting to the group chat script will receive SB_CHAT_SUCCESS event.

Possible Errors

There's several conditions which may prevent AdminBot from connecting to the group chat. Your script will receive SB_COMMAND_FAILED event with the following data:

  1. event SB_COMMAND_FAILED, status code SERVICE_UNAVAILABLE

Reason: Your SmartBots subscription does not include Group Chat Control
Solution: enable the Group Chat Control service for the group.

  1. event SB_COMMAND_FAILED, status code CHAT_LISTEN_FAILED

Reason: SL can't provide the HTTP listener for the script
Solution: this can happen for extremely crowded and overloaded sims. The only solution is to move to another sim.

Example

See AdminBot for Groups/Examples/Group chat listener for simple chat relay.

<< return back to AdminBot for Groups commands