# Chat Room Robot

###### Identifier:

org.eclipse.ecf.presence.bot.chatRoomRobot

###### Since:

1.0.0 milestone 6

###### Description:

This extension point allows implementers to define a chat room bot.

###### Configuration Markup:

<!ELEMENT extension (chatRoomRobot)+>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED

>

<!ELEMENT chatRoomRobot (chatRooms+)>

<!ATTLIST chatRoomRobot

id CDATA #REQUIRED

containerFactoryName CDATA #REQUIRED

connectId CDATA #REQUIRED

connectPassword CDATA #IMPLIED

name CDATA #IMPLIED

>

The chatRoomRobot extension point.

- id - The required id for the chat room robot. This must be a unique value relative to all other robots. For message handlers that are to use this robot, they must provide a chatrobotid that matches this value.
- containerFactoryName - The required container factory name. This should be the container factory name for a given protocol. For example, for the built in ECF IRC provider the value is ecf.irc.irclib.
- connectId - The connect ID for connecting to the given container. For example, for IRC the expected ID syntax of the connect ID is

      irc://username@host[:port]

      for example:  irc://slewis2_@irc.freenode.net

- connectPassword - An optional connect password. If a password is required to connect to the given container then an appropriate value must be provided.
- name - An optional name for the bot.

<!ELEMENT chatRooms EMPTY>

<!ATTLIST chatRooms

name CDATA #REQUIRED

password CDATA #IMPLIED

>

- name - The name of the chat room that the robot should join.
- password - The password required to join the chat room.

###### Examples:

       <extension
             point="org.eclipse.ecf.presence.bot.chatRoomRobot">
          <chatRoomRobot
                connectId="irc://slewis2_@irc.freenode.net"
                containerFactoryName="ecf.irc.irclib"
                id="org.eclipse.ecf.presence.bot.defaultbot">
              <chatRooms
                    name="#eclipse-ecf">
              </chatRooms>
              <chatRooms
                    name="#secret-channel"
                    password="secret-password">
              </chatRooms>
          </chatRoomRobot>
       </extension>

Note that to have the chatRoomRobot receive chat room messages and process them, that the chatRoomMessageHandler should also be defined using the id for the chatRoomRobot given above. For example:

       <extension
             point="org.eclipse.ecf.presence.bot.chatRoomMessageHandler">
          <handler
                chatRoomRobotId="org.eclipse.ecf.presence.bot.defaultbot"
                class="org.eclipse.ecf.presence.bot.DefaultChatRoomMessageHandler">
          </handler>
       </extension>

###### API Information:

See the API information for the chatRoomMessageHandler

###### Supplied Implementation:

No supplied implementation.

Copyright (c) 2007 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html