Table of Contents
Once the ejabberd server is running, it is now possible to connect to it using a standard instant messaging client such as Gajim, Pidgin, or any other of the myriad of clients that support XMPP. Please be aware that we have had reports of the Trillian Astra Pro IM client not being able to create accounts with the ejabberd setup described in this document.
Connecting using a normal IM client will allow you to confirm that you have correctly configured the ejabber server before attempting to connect with a BigWorld server and client.
Your client will be able to create a new account when attempting to connect. If you are prompted for a "Resource name", the name of the IM client you are using will suffice.
If you have trouble connecting at this stage it is most likely
either a mis-configuration of the ejabber server or an incorrectly entered
set of details when trying to connect with the client. To check the server
configuration you can check the ejabber server logs which will should be
located for most distributions under
/var/log/ejabberd
.
Provided the ejabber installation was performed correctly and the
server details were correctly provided, simply starting a server normally
should be enough to enable the example. All the initialisation of the
example is performed through the BaseApp personality script
FantasyDemo.py
.
To confirm that the Chat example has been enabled, search the BaseApp SCRIPT output for the following line:
XMPP Chat example enabled
On a Windows machine simply start the Fantasy Demo client as normal and connect to the server that was started in Starting a Fantasy Demo Server. Once connected and in the game world there are 4 operations that can be performed:
-
Add a friend to the players friends list
-
Message a friend
-
List all friends in the friends list
-
Delete a friend from the friends list
Note
For all the commands that require a <friend name>, in order for the Fantasy Demo script to differentiate between the in game friend lists and the XMPP friends list, the friend name MUST be a JID (which looks like an email address) e.g. friend@domain.com. The domain name will be whatever was specified when you configured your ejabber server in Servicing Domains.
-
To add a friend
/addFriend <friend name>
-
To message a friend
/msgFriend <friend name> : Message to your friend
-
To list all your friends
/listFriends
-
To delete a friend from your friends list
/delFriend <friend name>
Now you should have a connected game client and a connected IM client , you should be able to communicate between the two. If you haven't already, add your game client avatar name to your IM clients friend list e.g. avatar_name@domain.com, and ensure that you have added the IM client friend to your avatar's friends list using /addFriend im_name@domain.com.
You should now be able to send messages between the two.
FantasyDemo also has an XMPPEventNotifier entity which you can communicate with via your IM client. This entity broadcasts a text message whenever a Player logs on or off and can respond to watcher queries. XMPPEventNotifier's JID is server_of_<username>@<jabber server>, where <username> is the name of the user running the server.
-
To query a watcher, send the message
getWatcher <watcher path>