Messages from server to client:
Server Type
Server Information
Welcome Message
Server Userlist
Hall Userlist
Game Information
Server Gamelist
Server Predefined Games
A Player Connects To Server
A Player Disconnects From Server
A New Game Has Been Created On Server
A Game Has Ended On Server
Chat Message
Whisper Message
Chat Action Message
Start Game Indication
A Player Joins A Game
HN: A Player Joins A Game
A Player Leaves A Game
HN: A Player Leaves A Game
Letterset
Board Type
Current Game Hand
Current Game Borad
Moves Request
End Of Turn
Start Of Turn
Players Scores
Kick Indication
End Of Game
Error Message
Server Service Message

Back to index

Messages From Server To Client

   Server Type

General Description
  This message provides various information about the server.
Field Description Value(s)
type Indicates which type of server is used
version version of the server software
protocol Communication protocol used by this server. Only two protocols are currently supported: 0.2 and 1.0
Protocol 0.2
  SERVERTYPE|JDuplicate#0.5#0.2
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <servertype>
   <type>JDuplicate</type>
   <version>0.6</version>
   <protocolversion>1.0</protocolversion>
 </servertype>


   Server Information

General Description
  This message provides personalized information about the server.
Field Description Value(s)
name Server name.
creationdate Indicates when the server was launched (format is 'day/month/year').
Protocol 0.2
  SERVERINFO|Tukif Server#17/05/2004
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <serverinfo>
   <name>Tukif Server</name>
   <creationdate>17/05/2004</creationdate>
 </serverinfo>


   Welcome Message

General Description
  This message contains the server welcome message.
Field Description Value(s)
welcomemessage The server's welcome message.
Protocol 0.2
  WELCOMEMESSAGE|Welcome to our JDuplicate server!
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <welcomemessage>Welcome to our JDuplicate server!</welcomemessage>


   Server Userlist

General Description
  This message contains the list of all users currently connected to the server.
Field Description Value(s)
user The user's name. Name of one of the users connected to server.
Protocol 0.2
  SERVERUSERLIST|Ahmad#Jim#Judge Hedd#O-Dog#Solal#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <serveruserlist>
   <user>Ahmad</user>
   <user>Jim</user>
   <user>Judge Hedd</user>
   <user>O-Dog</user>
   <user>Solal</user>
 </serveruserlist>


   Hall Userlist

General Description
  This message contains the list of the hall users (ie not playing a game).
Field Description Value(s)
user The user's name. Name of one of the users connected to server.
Protocol 0.2
  HALLUSERLIST|Ahmad#Jim#Judge Hedd#O-Dog#Solal#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <halluserlist>
   <user>Ahmad</user>
   <user>Jim</user>
   <user>Judge Hedd</user>
   <user>O-Dog</user>
   <user>Solal</user>
 </halluserlist>


   Game Information

General Description
  This message provides all known information about a game running on the server.
Field Description Value(s)
name Game name.
creator Name of the player who created this game; he is also the game operator.
timeperturn Playing time allowed for each turn. It has to be a positive integer.
timeleft This attribute indicates the time left in the current turn. Useful for players joining a game in progress. It has to be a positive integer.
gametype Type of game (duplicate, scrabble, anagram, ...). One of the allowed game types on the server.
boardtype Type of the board.
(Not used in server v0.5)
CLASSIC or any other board type name but DYNAMIC.
The board type name DYNAMIC is used for gametypes where the boardtype is changed dynamically during the course of a game. For example the gametype anagram uses the boardtype DYNAMIC as the boardtype is changed every turn.
description A small, personalized, description of this game, set by game creator.
maxplayers Maximum number of players who can play simultaneously in this game. It has to be at least 1.
state Indicates the state of the game. -WAITING : the game has not yet started.
-INGAME : the game has already started.
-GAMEOVER : the game is over, but there are still some players in it.
turnsplayed Number of turns played up until now. It has to be a positive integer.
lettersset Language used for this game. Purely for informational purpose
player A player name. Name of a player connected to this game.
Protocol 0.2
  GAMEINFOS|ams's game#ams#120#97#duplicate#No word stealing please#8#INGAME#7#francais#ams&jim&judge hedd&
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <gameinfos>
   <name>ams's game</name>
   <creator>ams</creator>
   <timeperturn>120</timeperturn>
   <timeleft>97</timeleft>
   <gametype>duplicate</gametype>
   <boardtype>CLASSIC</boardtype>
   <description>No word stealing please</description>
   <maxplayers>8</maxplayers>
   <state>INGAME</state>
   <turnsplayer>7</turnsplayer>
   <lettersset>francais</lettersset>
   <player>ams</player>
   <player>Jim</player>
   <player>Judge Hedd</player>
 </gameinfos>


   Server Gamelist

General Description
  This message contains all running games on server. In fact, it is a list of game information.
Field Description Value(s)
gameinfos Contains a game information block. There can be several blocks. See Game Information
Protocol 0.2
  SERVERGAMELIST|Ahmad's Game#120#97#duplicate#No word stealing please#8#INGAME#7#francais#ams&Jim&Judge Hedd&~Luc's Game#Luc#60#60#anagram#I love graphics mode#4#WAITING#0#english#Luc&Solal&Ahmadeus&~
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <gamelist>
   <gameinfos>
     <name>ams's game</name>
     <creator>ams</creator>
     <timeperturn>120</timeperturn>
     <timeleft>97</timeleft>
     <gametype>duplicate</gametype>
     <boardtype>CLASSIC</boardtype>
     <description>No word stealing please</description>
     <maxplayers>8</maxplayers>
     <state>INGAME</state>
     <turnsplayer>7</turnsplayer>
     <lettersset>francais</lettersset>
     <player>ams</player>
     <player>Jim</player>
     <player>Judge Hedd</player>
   </gameinfos>
   <gameinfos>
     <name>Luc's game</name>
     <creator>Luc</creator>
     <timeperturn>60</timeperturn>
     <timeleft>60</timeleft>
     <gametype>anagram</gametype>
     <boardtype>CLASSIC</boardtype>
     <description>I love graphics mode</description>
     <maxplayers>4</maxplayers>
     <state>WAITING</state>
     <turnsplayer>0</turnsplayer>
     <lettersset>english</lettersset>
     <player>Luc</player>
     <player>Solal</player>
     <player>Ahmadeus</player>
   </gameinfos>
 <gamelist>


   Server Predefined Games

General Description
  This message contains a list of game settings available on the server (server preset combinations of gametypes, lettersets and dictionaries).
Field Description Value(s)
game A description of a predefined game setting.
  Field attributes Description
  type game settings used by the game One of the game type available on the JDuplicate server. Typically SCRABBLE, DUPLICATE or BOGGLE.
  code server code of this predefined game. One of the code declared in pdgames.pdg file on server.
Protocol 0.2
  PREDEFINEDGAMESETTINGS|dupfr04&DUPLICATE&Duplicate Francais, ODS 2004#scren04&SCRABBLE&English Scrabble, OSD 2004#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
   <predefinedgamessettings>
   <name code="dupfr04" type="DUPLICATE">Francais Duplicate, ODS 2004</name>
   <name code="dupen04" type="SCRABBLE">English Scrabble, OSD 2004</name>
 </predefinedgamesettings>


   A Player Connects To Server

General Description
  This message indicates to hall users that a new player has connected to the server.
Field Description Value(s)
name Player name.
clienttype Type of the JDuplicate client which is used to connect to the server.
clientversion Version of the JDuplicate client defined in the clienttype field.
Protocol 0.2
  PLAYERCONNECTS|O-Dog#JDuplicate Console Client#0.3
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <playerconnects>
   <name>O-Dog</name>
   <clienttype>JDuplicate Console Client</clienttype>
   <clientversion>0.3</clientversion>
 </playerconnects>


   Player Disconnects From Server

General Description
  This message indicates to hall users that a player has left (disconnected from) the server.
Field Description Value(s)
name Name of the player that left the server.
reason Reason for leaving given by this player.
Protocol 0.2
  PLAYERDISCONNECTS|Solal#I'm too bad to play with you
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <playerdisconnects>
   <name>Solal</name>
   <reason>I'm too bad to play with you</reason>
 </playerdisconnects>


   A New Game Has Been Created On Server

General Description
  This message indicates to hall users that a new game has been created on the server.
Field Description Value(s)
gameinfos Contains the game information block for the newliy created game.
Protocol 0.2
  NEWGAME|ams's game#120#97#English, OSPD 2004#No word stealing please#8#WAITING#0#francais#ams&jim&judge hedd&
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <newgame>
   <gameinfos>
     <name>ams's game</name>
     <creator>ams</creator>
     <timeperturn>120</timeperturn>
     <timeleft>97</timeleft>
     <type>duplicate</type>
     <description>No word stealing please</description>
     <maxplayers>8</maxplayers>
     <state>INGAME</state>
     <turnsplayer>7</turnsplayer>
     <lettersset>francais</lettersset>
     <player>ams</player>
     <player>Jim</player>
     <player>Judge Hedd</player>
   </gameinfos>
 </newgame>


   Game Ended On Server

General Description
  This message indicates to hall users that a game has ended.
Field Description Value(s)
gameover Indicates which game has ended.
Protocol 0.2
  GAMEOVER|ams's game
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <gameover>ams's game</gameover>


   Chat Message

General Description
  This message contains chat text. This text will be sent to every player in the hall or in the current game (depending on wether the player is in the hall or in a game)
Field Description Value(s)
from Name of the player who wrote This message. One of the players connected to server.
text Chat text.
Protocol 0.2
  CHAT|Jim#Hi everyone!
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <chat>
   <from>Jim</from>
   <text>Hi everyone!</text>
 </chat>


   Whisper Message

General Description
  This message contains whisper text. Only the player to which the message is specifically sent to will receive the message.
Field Description Value(s)
from Name of player who wrote this whisper message. One of the players connected to server.
text Whisper text.
Protocol 0.2
  WHISPER|My Friend#Don't you think this guy sucks?
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <whisper>
   <from>My friend</from>
   <text>Don't you think this guy sucks?</text>
 </whisper>


   Chat Action Message

General Description
  This message contains a chat action.
Field Description Value(s)
from Name of player performing the action. One of the players connected to server.
action the action text.
Protocol 0.2
  CHATACTION|O-Dog#believes JDuplicate is great!
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <chataction>
   <from>O-Dog</from>
   <action>believes JDuplicate is great!</action>
 </chataction>


   Start Game Indication

General Description
  This message indicates the start of the game.
  It does not contain any data.
Protocol 0.2
  STARTGAMEACK|
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <startgameack/>


   A Player Joins A Game

General Description
  This message contains information about the player joining the current game.
Usage
  This message is sent to all players connected to a game.
  Even the player joining the game receives This message; it's then used as a join ack.
Field Description Value(s)
name Player name One of the players connected to server.
clienttype Type of client used to connect to server.
clientversion Version of this client.
Protocol 0.2
  PLAYERJOINSGAME|O-Dog#JDuplicate Console Client#0.3
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <playerjoinsgame>
   <name>O-Dog</name>
   <clienttype>JDuplicate Console Client</clienttype>
   <clientversion>0.3</clientversion>
 </playerjoinsgame>


   Hall Notice: A Player Joins A Game

General Description
  This message notifies the players in the hall that a player has joined a game on the server. This is mostly used by clients to properly update the hall userlist as well as eventual per-game userlist display.
Usage
  This message is sent to all currently players in the hall.<
Field Description Value(s)
gamename Game name The name of a game running on the server.
playername Name of the player joining a game.
Protocol 0.2
  HNPLAYERJOINSGAME|My Game#O-Dog
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <hnplayerjoinsgame>
   <gamename>My Game</gamename>
   <playername>O-Dog</playername>
 </hnplayerjoinsgame>


   A Player Leaves A Game

General Description
  This message indicates that a player left the game he was connected to and the reason for him parting.
Usage
  This message is sent to the players connected to the game the player left.
Field Description Value(s)
name Player name. One of the players connected to server.
reason Reason this player gave.
Protocol 0.2
  PLAYERLEAVESGAME|Solal#I'm too bad to play with you
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <playerleavesgame>
   <name>Solal</name>
   <reason>I'm too bad to play with you</reason>
 </playerleavesgame>


   Hall Notice: A Player Leaves A Game

General Description
  This message notifies all hall users that a player has left a game so that the clients can update their hall userlist and eventual per-game userlists.
Usage
  This message is sent to all currently players in the hall.<
Field Description Value(s)
gamename Player name. The name of the game the player has left
playername Name of the player who has left a game
reason Reason this player gave.
Protocol 0.2
  HNPLAYERLEAVESGAME|hackers game#Solal#I'm too bad to play with you
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <hnplayerleavesgame>
   <gamename>hackers game</gamename>
   <playername>solal</playername>
   <reason>I'm too bad to play with you</reason>
 </hnplayerleavesgame>


   Letterset

General Description
  This message contains the letterset used by the game.
Usage
  This message is sent only if client requests game letterset.
Field Description Value(s)
letter One letter of the letterset.
  Field attributes Description
  val Points value (score) for this letter.
  occ Occurences of this letter in the beanbag.
Protocol 0.2
  LETTERSET|A&1&2#B&3&4#...
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <letterset>
   <letter val="1" occ="2">A</letter>
   <letter val="3" occ="4">A</letter>
   ...
 </letterset>


   Board Type

General Description
  This message describes the board's size and locations of the bonus squares.
Usage
  This message is sent to any client requesting it.
Field Description Value(s)
name Board type name Usually written in uppercase letters
width Board width.
height Board height.
bonus Case bonus value. There are currently two types of bonuses:
-Wn: word counts n
-Ln: letter counts n
  Field attributes Description
  x x axis Has to be a positive integer, in the range of the game board.
  y y axis Has to be a letter, in the range of the game board.
Protocol 0.2
  NOT SUPPORTED
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <boardtype>
   <name>CLASSIC</name>
   <width>20</width>
   <height>18</height>
   <bonus x="1" y="A">W4</bonus>
   <bonus x="5" y="A">L3</bonus>
   ...
   <bonus x="20" y="R">L4</bonus>
 </boardtype>


   Current Game Hand

General Description
  This message contains the current hand for this game.
Usage
  Depending on game type, This message is sent to all players or only to the player who's current turn is just starting.
  It can also be requested by the client. The server's answer would then be the hand currently associated to the player who has made the request.
Field Description Value(s)
letter One letter of the hand This letter has to be in the game letterset.
Protocol 0.2
  HAND|A#B#C#D#E#F#G#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <hand>
   <letter>A</letter>
   <letter>B</letter>
   <letter>C</letter>
   <letter>D</letter>
   <letter>E</letter>
   <letter>F</letter>
   <letter>G</letter>
 </hand>


   Current Game Board

General Description
  This message describes the current state of the game's board.
  All letters are UPPERCASE, except for blank letters which are are written in lowercase. Letters are ordered from the top left of the board to the bottom right, one row after another row.
Usage
  This message is sent when the client requests it, usually when a player joins a game in progress.
Field Description Value(s)
letter Letter value on a borad case. One of the players connected to server.
  Field attributes Description
  x x axis Has to be a positive integer, in the range of the game board.
  y y axis Has to be a letter, in the range of the game board.
Protocol 0.2
Rows are separated by '#'. Letters in rows are separated by '&'. If there is no letter in a square, we put a dot '.'.
  BOARD|A&B&.&D&...# ... #W&x&Y&Z&...#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <board>
   <row>
     <letter x="1" y="A">A</letter>
     <letter x="2" y="A">B</letter>
     <letter x="4" y="A">D</letter>
     ...
   </row>
   <row>
    ...
   </row>
   <row>
     <letter x="1" y="L">W</letter>
     <blank x="2" y="L">X</blank>
     <letter x="3" y="L">Y</letter>
     <letter x="4" y="L">Z</letter>
   </row>
 </board>


   Moves Request

General Description
  This message requests the client for the player's moves.
  This message does not contain any data.
Usage
  This message is sent at the each end of turn (timeout).
  Depending on the game type, it can be sent to only one player (standard Scrabble) or to all player (duplicate, anagram).
Protocol 0.2
  MOVESREQUEST|
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <movesrequest/>;


   Start Of Turn

General Description
  This message is used to indicate the beginig of a turn. It also specifies which players can play the current turn.
For example, in Scrabble games, only one player gets to play every turn: the Plays This Turn message thus contains as a parameter the name of the player whose turn it is. In duplicate games, every player plays on every turn: in this case the message contains no parameter.
Usage
  This message is sent at the beginning of every turn. It is also sent to the players joining a game that already started.
Field Description Value(s)
player(s) Name of player(s) whose turn it is to play. One or more players connected to this game.
If this field is empty, all players can play this turn. In duplicate games, this messsage therefore never has any parameter.
Protocol 0.2
STARTOFTURN|ahmadeus&
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <startofturn>
   <player>ahmadeus</player>
 </startofturn>


   End Of Turn

General Description
  This message describes indicates to the players that the current turn finished; it also contains the best moves for this finished turn.
Usage
  This message is sent to all game players at the end of the turn.
  In one-player-per-turn-games (such as Scrabble), This message contains the player's moves.
  In multiple players per turn game (such as Duplicate), This message contains the list of the players with the best scores (in case of ties), as well as the received moves that is applied to the board.
Field Description Value(s)
selectedplayer Best players of this turn. One of the players connected to the game.
otherplayer Other players who have the same turn score than the selected player. Players connected to the game.
totalscore Total points this move scored. Has to be at least 0.
letter One of the letters played to make this best moves. Has to be in the game letterset.
  Field attributes Description
  x x axis Has to be a positive integer, in the range of the game board.
  y y axis Has to be a letter, in the range of the game board.
word One of the words engendered by the best moves
  Field attributes Description
  score Points this word scored. Has to be a positive integer.
  owner
(1.0, optional)
Player who played the word. One of the players in the game. If this field is not specified, all words are assumed to have been played by selectedplayer
bonus Type of bonus scored by this best moves.
  Field attributes Description
  score Points scored by this best moves. Has to be a positive integer.
Protocol 0.2
  selectedplayer and otherplayer are in the same field in this protocol version.

  ENDOFTURN|ams&jim&#3&A&C&3&B&A&3&C&t&#CAT&8&JET&28&CI&2&#scrabble&50&
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <endofturn>
   <selectedplayer>ams</selectedplayer>
   <otherplayer>jim</otherplayer>
   <totalscore>38</totalscore>
   <letter x="3" y="A">C</letter>
   <letter x="3" y="B">A</letter>
   <letter x="3" y="C" blank="T">*</letter>
   <word score="8">CAT</word>
   <word score="28">JET</word>
   <word score="2">CI</word>
   <bonus score="50">scrabble</bonus>
 </endofturn>


   Players Scores

General Description
  This message contains both the total and last turn players scores.
Usage
  This message is sent at the end of each turn.
Field Description Value(s)
player Name of player. One of the players connected to server.
  Field attributes Description
  total Total score for this player. Has to be a positive integer.
  turn Last turn's score for this player. Has to be a positive integer.
Protocol 0.2
  SCORES|Ahmadeus&101&12#Jim&102&45#Lemming&103&4#Solal&104&1#
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <scores>
   <player total="101" turn="12">Ahmadeus</player>
   <player total="102" turn="45">Jim</player>
   <player total="103" turn="4">Lemming</player>
   <player total="104" turn="1">Solal</player>
 </scores>


   Kick Indication

General Description
  This message contains a kick command.
Usage
  Only game operators can kick other players.
  This message is sent to all players connected to a game, even to the kicked player kicked (it then acts like an ack).
Field Description Value(s)
kicker Name of player who kicks aplayer. One of the players connected to server.
kicked Name of player who is kicked. One of the players connected to server.
text Whisper text.
Protocol 0.2
  KICK|Lemming#jim#We don't play with lamers
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <kick>
   <kicker>Lemming</kicker>
   <kicked>jim</kicked>
   <reason>We don't play with lamers</reason>
 </kick>


   End Of Game

General Description
  This message indicates that the end of a game has been reached.
Field Description Value(s)
finalscore Total score of the winner of the game. It has to be a positive integer.
winner Name of player who won the game. One of the players connected to server.
Protocol 0.2
  ENDGAME|1500#Bernard Pivot
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <endgame>
   <finalscore>1500</finalscore>
   <winner>Bernard Pivot</<winner>
 </endgame>


   Error Message

General Description
  This message contains a code for an error the server encountered.
Error codes are described in the error codes section of the protocol specifications
Field Description Value(s)
category Error category Defines the category of an error (see error code specs).
type Error type Defines the type of the error within a category (see error code specs).
parm Custom error parameter (Optional) parameters related to the error.
Protocol 0.2
  ERROR|60#107#MIASON
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <error>
   <category>60</category>
   <type>107</type>
   <parm>MIASON</parm>
 </error>


   Server Service Message

General Description
  This message contains a notification from the server about an exceptional event
This command can be used to notify users on server maintenance work, alerts, etc.
Usage
  This message is sent to all users connected to server.
Field Description Value(s)
servicemessage Notification message text.
Protocol 0.2
  NOT SUPPORTED
Protocol 1.0
 <?xml version="1.0" encoding="UTF-8"?>
 <servicemessage>Server will be restarted in 15 minutes.</servicemessage>