logo

TheoWorlds Builder SDK v2 Documentation

TheoChat v2

1. Introduction

TheoChat v2 is a simple, but fully functional avatar chat example built using Theo Isometric Engine™.

TheoChat v2

2. Moderator functions

Besides the regular user, you can login to TheoChat as a moderator and get access to additional functions: ban and kick users.

Note!To login as a moderator, use username: mod, password: pass

Note!When using ElectroServer, you can enter the kick interval duration in minutes. SmartFox Server does not support this function - the kick time is set up in the server configuration file and can not be changed on-the-fly. You can modify it in the server configuration file (it is 30 minutes by default).

To add/edit a moderator in SmartFox Server you just need to edit its config file.

To add/edit a moderator in ElectroServer, you will have to modify the configuration file of our ElectroServer moderator extension. Locate the file extension.xml (in /socket_servers/Electroserver/moderatorplugin/) and modify/add the colored lines:

<Extension>
     <Name>moderatorplugin</Name>
     <EventHandlers>
          <LoginHandlers>
               <LoginHandler>
                    <Handle>logineventhandler</Handle>
                    <Type>ActionScript</Type>
                    <Path>logineventhandler.as</Path>
                    <Synchronized>true</Synchronized>
                    <Variables>
                         <Variable name="moderators" type="esobject">
                              <Entry>
                                   <Variable name="user" type="string">mod</Variable>
                                   <Variable name="password" type="string">pass</Variable>
                              </Entry>
                         </Variable>
                    </Variables>
               </LoginHandler>
          </LoginHandlers>
          <LogoutHandlers>
               <LogoutHandler>
                    <Handle>logouteventhandler</Handle>
                    <Type>ActionScript</Type>
                    <Path>logouteventhandler.as</Path>
                    <Synchronized>true</Synchronized>
               </LogoutHandler>
          </LogoutHandlers>
     </EventHandlers>
     <Plugins>
          <Plugin>
               <Handle>moderatorplugin</Handle>
               <Type>ActionScript</Type>
               <Path>moderatorplugin.as</Path>
          </Plugin>
     </Plugins>
</Extension>


3. Emoticons

To edit/modify the emoticons, simply edit the images located in the "emoticons" folder and the emoticons configuration file called emoticons.xml. This XML file describes what image to use when replacing certain key characters in the chat:

<?xml version="1.0"?>
<!--http://www.TheoWorlds.com-->
<emoticons>
     <e val=":)" url="01.swf"/>
     <e val=":(" url="02.swf"/>
     .....

 
Last updated: September 17, 2009