Skip to content
Innocent Bystander edited this page Feb 17, 2015 · 2 revisions

Chats can be synced together, called a syncout. If a person says something in chat A, that message will be relayed into chat B by the bot, and vice-versa, allowing multiple rooms to have conversations with each other. The primary use for this is to have more than 150 (the current hangout limit) users talking to each other in the same room.

Basic Configuration

Requires plugin: syncrooms

This feature only has two config.json keys, documented in the following section:

syncing_enabled

  • default: not set
  • If true, will look for config.sync_rooms and start relaying chats across configured rooms
  • Can only be enabled/disabled globally
"sync_rooms": [
  [
      "CONVERSATION_1_ID",
      "CONVERSATION_2_ID"
  ],
  [
      "CONVERSATION_3_ID",
      "CONVERSATION_4_ID",
      "CONVERSATION_5_ID"
  ]
]
  • a list containing another set of lists, which contains conversation IDs to sync, this allows the bot to support multiple separately-synced chats e.g. rooms A, B, C and D, E separately.

Special note for legacy syncouts configuration

Older bots would be configured using the legacy syncout configuration. The plugin will automatically migrate these old configurations to the new format by rewriting your config.json file. Other keys in config.conversations will not be affected by the migration to preserve compatibility with older features.

The legacy configuration is provided here for reference purposes - it may be removed in the future:

"conversations":
{
  "CONVERSATION_1_ID": {  
    "sync_rooms": ["CONVERSATION_1_ID", "CONVERSATION_2_ID"]  
  },  
  "CONVERSATION_2_ID": {  
    "sync_rooms": ["CONVERSATION_1_ID", "CONVERSATION_2_ID"]
  },  
  "CONVERSATION_3_ID": {  
    "sync_rooms": ["CONVERSATION_3_ID", "CONVERSATION_4_ID", "CONVERSATION_5_ID"]  
  },
  "CONVERSATION_4_ID": {  
    "sync_rooms": ["CONVERSATION_3_ID", "CONVERSATION_4_ID", "CONVERSATION_5_ID"]  
  },
  "CONVERSATION_5_ID": {  
    "sync_rooms": ["CONVERSATION_3_ID", "CONVERSATION_4_ID", "CONVERSATION_5_ID"]  
  }
}

Commands

Requires plugin: syncrooms

/bot syncusers [<conversation id>] ["rooms"]

  • syncroom-aware version of /bot users
  • when used in a syncroom, will list all users in all linked rooms
  • supply optional <conversation id> to look at other rooms privately
  • append string "rooms" to segment the returned user list by room, instead of combined (default)
  • displays total unique user count at the end of the listing

Managing Syncouts via Bot Commands

Requires plugin: syncrooms, syncrooms_config

The syncrooms_config plugin implements two powerful bot commands to manage syncrooms directly from Hangouts without messing around with config.json.

/bot attachsyncout <conversation id> [<conversation id>] ...

  • supplying one conversation id that isn't the current conversation id will make the bot attempt to either attach to an existing syncout that already contains the supplied conversation id; OR create a new syncout with the current and supplied conversation.
  • supplying a list of conversation ids will make the bot attempt to either attach to an existing syncout as long as one of the supplied conversation id matches an existing one in the existing syncout; OR create a new syncout with all the conversation ids supplied.

/bot detachsyncout [<conversation id>]

  • WARNING: calling this without parameters will will make the bot attempt to detach the current conversation from a syncout.
  • calling this with a conversation id will make the bot attempt to detach the specified conversation from a syncout.

Automatic Translation in Syncout Rooms

Requires plugin: syncrooms, syncrooms_autotranslate

Syncouts support automatic translations between rooms in a given syncout. For example, Room A can be configured as having native language "English", whereas Room B will be configured as "Chinese (Traditional)". All chats relayed from Room A to Room B will be translated from English to Chinese (Traditional) and vice-versa. Translation services are provided by Google Translate via the Goslate Python library.

Ensure that you have an existing syncout in operation, then use the following bot command:

/bot roomlanguage <ISO639-1 ALL-CAPS language code|language fulltext/fragment>

  • when using ISO639-1, ensure that the code is ALL-CAPS - a list of codes can be found here: http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
  • alternatively, you can specify the full-text or string fragment that matches a supported language such as: "english", "chinese (tra" - matches "Chinese (Traditional)", etc.
  • the bot will reply the command if it successfully sets the room language. language support and translation accuracy is fully dependent on Google Translate.

DISCLAIMER: The makers/maintainers of the bot and/or this plugin make no guarantees whatsoever on the accuracy nor reliability of this plugin.

Clone this wiki locally