Index: /code/branches/objecthierarchy/src/network/CMakeLists.txt
===================================================================
--- /code/branches/objecthierarchy/src/network/CMakeLists.txt	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/CMakeLists.txt	(revision 1953)
@@ -1,3 +1,4 @@
 SET( NETWORK_SRC_FILES
+  ChatListener.cc
   Client.cc
   ClientConnection.cc
Index: /code/branches/objecthierarchy/src/network/ChatListener.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/ChatListener.cc	(revision 1953)
+++ /code/branches/objecthierarchy/src/network/ChatListener.cc	(revision 1953)
@@ -0,0 +1,42 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "ChatListener.h"
+
+#include "core/CoreIncludes.h"
+#include "core/Core.h"
+
+namespace network
+{
+    ChatListener::ChatListener()
+    {
+        RegisterRootObject(ChatListener);
+    }
+}
+
+
Index: /code/branches/objecthierarchy/src/network/ChatListener.h
===================================================================
--- /code/branches/objecthierarchy/src/network/ChatListener.h	(revision 1953)
+++ /code/branches/objecthierarchy/src/network/ChatListener.h	(revision 1953)
@@ -0,0 +1,49 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _NETWORK_ChatListener__
+#define _NETWORK_ChatListener__
+
+#include "NetworkPrereqs.h"
+
+#include "ClientInformation.h"
+#include "core/OrxonoxClass.h"
+
+namespace network
+{
+    class _NetworkExport ChatListener : virtual public orxonox::OrxonoxClass
+    {
+        public:
+            ChatListener();
+            virtual ~ChatListener() {}
+
+            virtual void incomingChat(const std::string& message, unsigned int senderID) = 0;
+    };
+}
+
+#endif /* _NETWORK_ChatListener__ */
Index: /code/branches/objecthierarchy/src/network/Client.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/Client.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Client.cc	(revision 1953)
@@ -46,4 +46,5 @@
 #include "core/CoreIncludes.h"
 #include "packet/Packet.h"
+
 // #include "packet/Acknowledgement.h"
 
@@ -69,5 +70,5 @@
   * @param port port of the application on the server
   */
-  Client::Client(std::string address, int port) : client_connection(port, address){
+  Client::Client(const std::string& address, int port) : client_connection(port, address){
     isConnected=false;
     isSynched_=false;
@@ -116,15 +117,15 @@
   }
 
-  bool Client::processChat(std::string message, unsigned int playerID){
-    COUT(1) << "Player " << playerID << ": " << message << std::endl;
+  bool Client::processChat(const std::string& message, unsigned int playerID){
+//    COUT(1) << "Player " << playerID << ": " << message << std::endl;
     return true;
   }
-  
+
   /**
    * This function implements the method of sending a chat message to the server
-   * @param message message to be sent 
+   * @param message message to be sent
    * @return result(true/false)
    */
-  bool Client::chat(std::string message){
+  bool Client::chat(const std::string& message){
     packet::Chat *m = new packet::Chat(message, Host::getPlayerID());
     return m->send();
@@ -134,5 +135,5 @@
   /**
    * Processes incoming packets, sends a gamestate to the server and does the cleanup
-   * @param time 
+   * @param time
    */
   void Client::tick(float time){
Index: /code/branches/objecthierarchy/src/network/Client.h
===================================================================
--- /code/branches/objecthierarchy/src/network/Client.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Client.h	(revision 1953)
@@ -66,30 +66,26 @@
   public:
     Client();
-    Client(std::string address, int port);
+    Client(const std::string& address, int port);
     Client(const char *address, int port);
     ~Client();
-    
+
     bool establishConnection();
     bool closeConnection();
     bool queuePacket(ENetPacket *packet, int clientID);
-    bool processChat(std::string message, unsigned int playerID);
-    virtual bool chat(std::string message);
+    bool processChat(const std::string& message, unsigned int playerID);
+    virtual bool chat(const std::string& message);
+    virtual bool broadcast(const std::string& message) { return false; }
     //bool sendChat(packet::Chat *chat);
-    
-//    static void Chat( std::string message );
-    
-    //static void setShipID( unsigned int shipID){ dynamic_cast<Client *>(instance_)->shipID_=shipID; }
-    static void setClientID( unsigned int clientID){ dynamic_cast<Client *>(instance_)->clientID_=clientID; }
-    
+
     void tick(float time);
 
   private:
     virtual bool isServer_(){return false;}
-    
+
     ClientConnection client_connection;
     GamestateClient gamestate;
     bool isConnected;
     bool isSynched_;
-    
+
     bool gameStateFailure_;
   };
Index: /code/branches/objecthierarchy/src/network/ClientConnection.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/ClientConnection.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ClientConnection.cc	(revision 1953)
@@ -54,5 +54,5 @@
   boost::recursive_mutex ClientConnection::enet_mutex_;
 
-  ClientConnection::ClientConnection(int port, std::string address) {
+  ClientConnection::ClientConnection(int port, const std::string& address) {
     quit=false;
     server=NULL;
Index: /code/branches/objecthierarchy/src/network/ClientConnection.h
===================================================================
--- /code/branches/objecthierarchy/src/network/ClientConnection.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ClientConnection.h	(revision 1953)
@@ -62,5 +62,5 @@
   class _NetworkExport ClientConnection{
   public:
-    ClientConnection(int port, std::string address);
+    ClientConnection(int port, const std::string& address);
     ClientConnection(int port, const char* address);
     ~ClientConnection();
Index: /code/branches/objecthierarchy/src/network/ClientInformation.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/ClientInformation.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ClientInformation.cc	(revision 1953)
@@ -45,7 +45,7 @@
 namespace network
 {
-  
+
   ClientInformation *ClientInformation::head_=0;
-  
+
   ClientInformation::ClientInformation() {
     if(!head_)
@@ -129,5 +129,5 @@
     return true;
   }
-  
+
   bool ClientInformation::setPartialGamestateID(int id){
     if(!this)
@@ -150,5 +150,5 @@
       return NULL;
   }
-  
+
   int ClientInformation::getFailures(){
     return failures_;
@@ -160,9 +160,9 @@
     failures_=0;
   }
-  
+
   enet_uint32 ClientInformation::getRTT(){
     return peer_->roundTripTime;
   }
-  
+
   enet_uint32 ClientInformation::getPacketLoss(){
     return peer_->packetLoss;
@@ -175,5 +175,5 @@
       return -1;
   }
-  
+
   int ClientInformation::getPartialGamestateID() {
     if(this)
@@ -197,5 +197,5 @@
 
   bool ClientInformation::removeClient(int clientID) {
-    if(clientID==CLIENTID_UNKNOWN)
+    if((unsigned int)clientID==CLIENTID_UNKNOWN)
       return false;
     ClientInformation *temp = head_;
Index: /code/branches/objecthierarchy/src/network/ClientInformation.h
===================================================================
--- /code/branches/objecthierarchy/src/network/ClientInformation.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ClientInformation.h	(revision 1953)
@@ -47,5 +47,4 @@
 
 #define GAMESTATEID_INITIAL -1
-#define CLIENTID_UNKNOWN -2
 
 // WATCH OUT: THE CLIENTINFORMATION LIST IS NOT THREADSAFE ANYMORE
@@ -53,4 +52,6 @@
 namespace network
 {
+  static const unsigned int CLIENTID_UNKNOWN = (unsigned int)-2;
+
   /**
   * This class implements a list for client informations
Index: /code/branches/objecthierarchy/src/network/ConnectionManager.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/ConnectionManager.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ConnectionManager.cc	(revision 1953)
@@ -88,5 +88,5 @@
   }
 
-  ConnectionManager::ConnectionManager(int port, std::string address) :receiverThread_(0) {
+  ConnectionManager::ConnectionManager(int port, const std::string& address) :receiverThread_(0) {
     assert(instance_==0);
     instance_=this;
Index: /code/branches/objecthierarchy/src/network/ConnectionManager.h
===================================================================
--- /code/branches/objecthierarchy/src/network/ConnectionManager.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/ConnectionManager.h	(revision 1953)
@@ -79,5 +79,5 @@
     ConnectionManager(int port);
     ConnectionManager(int port, const char *address);
-    ConnectionManager(int port, std::string address);
+    ConnectionManager(int port, const std::string& address);
     ~ConnectionManager();
     //ENetPacket *getPacket(ENetAddress &address); // thread1
Index: /code/branches/objecthierarchy/src/network/Host.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/Host.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Host.cc	(revision 1953)
@@ -32,4 +32,5 @@
 #include "core/ConsoleCommand.h"
 #include "packet/Packet.h"
+#include "ChatListener.h"
 
 namespace network {
@@ -38,5 +39,5 @@
 
 Host *Host::instance_=0;
-  
+
 /**
  * @brief Constructor: assures that only one reference will be created and sets the pointer
@@ -90,5 +91,5 @@
  * @return playerID
  */
-unsigned int Host::getPlayerID(){ 
+unsigned int Host::getPlayerID(){
   if(!instance_)
     return 0;
@@ -96,5 +97,5 @@
 }
 
-bool Host::Chat(std::string message){
+bool Host::Chat(const std::string& message){
   if(!instance_)
     return false;
@@ -102,5 +103,14 @@
 }
 
-bool Host::incomingChat(std::string message, unsigned int playerID){
+bool Host::Broadcast(const std::string& message){
+  if(!instance_)
+    return false;
+  return instance_->broadcast(message);
+}
+
+bool Host::incomingChat(const std::string& message, unsigned int playerID){
+  for (orxonox::ObjectList<ChatListener>::iterator it = orxonox::ObjectList<ChatListener>::begin(); it != orxonox::ObjectList<ChatListener>::end(); ++it)
+    it->incomingChat(message, playerID);
+
   return instance_->processChat(message, playerID);
 }
Index: /code/branches/objecthierarchy/src/network/Host.h
===================================================================
--- /code/branches/objecthierarchy/src/network/Host.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Host.h	(revision 1953)
@@ -50,6 +50,7 @@
     //virtual bool sendChat(packet::Chat *chat)=0;
     virtual bool queuePacket(ENetPacket *packet, int clientID)=0;
-    virtual bool chat(std::string message)=0;
-    virtual bool processChat(std::string message, unsigned int playerID)=0;
+    virtual bool chat(const std::string& message)=0;
+    virtual bool broadcast(const std::string& message)=0;
+    virtual bool processChat(const std::string& message, unsigned int playerID)=0;
     virtual bool isServer_()=0;
 
@@ -73,6 +74,7 @@
     static void setShipID(unsigned int id){ instance_->shipID_ = id; }
     static bool isServer(){ return instance_->isServer_(); }
-    static bool Chat(std::string message);
-    static bool incomingChat(std::string message, unsigned int playerID);
+    static bool Chat(const std::string& message);
+    static bool Broadcast(const std::string& message);
+    static bool incomingChat(const std::string& message, unsigned int playerID);
   private:
 };
Index: /code/branches/objecthierarchy/src/network/Server.cc
===================================================================
--- /code/branches/objecthierarchy/src/network/Server.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Server.cc	(revision 1953)
@@ -58,4 +58,5 @@
 #include "packet/DeleteObjects.h"
 #include <util/Convert.h>
+#include "ChatListener.h"
 
 namespace network
@@ -85,5 +86,5 @@
   * @param bindAddress Address to listen on
   */
-  Server::Server(int port, std::string bindAddress) {
+  Server::Server(int port, const std::string& bindAddress) {
     timeSinceLastUpdate_=0;
     connection = new ConnectionManager(port, bindAddress);
@@ -128,5 +129,5 @@
   }
 
-  bool Server::processChat(std::string message, unsigned int playerID){
+  bool Server::processChat(const std::string& message, unsigned int playerID){
     ClientInformation *temp = ClientInformation::getBegin();
     packet::Chat *chat;
@@ -138,5 +139,5 @@
       temp = temp->next();
     }
-    COUT(1) << "Player " << playerID << ": " << message << std::endl;
+//    COUT(1) << "Player " << playerID << ": " << message << std::endl;
     return true;
   }
@@ -304,5 +305,5 @@
       listener++;
     }
-    
+
     newid++;
 
@@ -367,9 +368,17 @@
   }
 
-  bool Server::chat(std::string message){
+  bool Server::chat(const std::string& message){
+      return this->sendChat(message, Host::getPlayerID());
+  }
+
+  bool Server::broadcast(const std::string& message){
+      return this->sendChat(message, CLIENTID_UNKNOWN);
+  }
+
+  bool Server::sendChat(const std::string& message, unsigned int clientID){
     ClientInformation *temp = ClientInformation::getBegin();
     packet::Chat *chat;
     while(temp){
-      chat = new packet::Chat(message, Host::getPlayerID());
+      chat = new packet::Chat(message, clientID);
       chat->setClientID(temp->getID());
       if(!chat->send())
@@ -377,5 +386,8 @@
       temp = temp->next();
     }
-    COUT(1) << "Player " << Host::getPlayerID() << ": " << message << std::endl;
+//    COUT(1) << "Player " << Host::getPlayerID() << ": " << message << std::endl;
+    for (orxonox::ObjectList<ChatListener>::iterator it = orxonox::ObjectList<ChatListener>::begin(); it != orxonox::ObjectList<ChatListener>::end(); ++it)
+      it->incomingChat(message, clientID);
+
     return true;
   }
Index: /code/branches/objecthierarchy/src/network/Server.h
===================================================================
--- /code/branches/objecthierarchy/src/network/Server.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/network/Server.h	(revision 1953)
@@ -61,5 +61,5 @@
     Server();
     Server(int port);
-    Server(int port, std::string bindAddress);
+    Server(int port, const std::string& bindAddress);
     Server(int port, const char *bindAddress);
     ~Server();
@@ -67,5 +67,5 @@
     void open();
     void close();
-    bool processChat(std::string message, unsigned int playerID);
+    bool processChat(const std::string& message, unsigned int playerID);
     bool queuePacket(ENetPacket *packet, int clientID);
     void tick(float time);
@@ -86,5 +86,7 @@
     bool sendGameState();
     bool sendObjectDeletes();
-    virtual bool chat(std::string message);
+    virtual bool chat(const std::string& message);
+    virtual bool broadcast(const std::string& message);
+    bool sendChat(const std::string& message, unsigned int clientID);
 
     //void processChat( chat *data, int clientId);
Index: /code/branches/objecthierarchy/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/CMakeLists.txt	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/CMakeLists.txt	(revision 1953)
@@ -33,4 +33,5 @@
   overlays/hud/HUDRadar.cc
   overlays/hud/HUDSpeedBar.cc
+  overlays/hud/ChatOverlay.cc
 
   tools/BillboardSet.cc
Index: /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc	(revision 1953)
@@ -34,4 +34,6 @@
 #include "objects/infos/PlayerInfo.h"
 
+#include "network/Host.h"
+
 namespace orxonox
 {
@@ -54,4 +56,22 @@
             return (*it);
 
+        return 0;
+    }
+
+    PlayerInfo* Gametype::getClient(unsigned int clientID)
+    {
+        Gametype* gametype = Gametype::getCurrentGametype();
+        if (gametype)
+        {
+            std::map<unsigned int, PlayerInfo*>::const_iterator it = gametype->clients_.find(clientID);
+            if (it != gametype->clients_.end())
+                return it->second;
+        }
+        else
+        {
+            for (ObjectList<PlayerInfo>::iterator it = ObjectList<PlayerInfo>::begin(); it != ObjectList<PlayerInfo>::end(); ++it)
+                if (it->getClientID() == clientID)
+                    return (*it);
+        }
         return 0;
     }
@@ -112,10 +132,14 @@
     void Gametype::playerJoined(PlayerInfo* player)
     {
-        COUT(0) << "player " << player->getName() << " joined" << std::endl;
+        std::string message = player->getName() + " entered the game";
+        COUT(0) << message << std::endl;
+        network::Host::Broadcast(message);
     }
 
     void Gametype::playerLeft(PlayerInfo* player)
     {
-        COUT(0) << "player " << player->getName() << " left" << std::endl;
+        std::string message = player->getName() + " left the game";
+        COUT(0) << message << std::endl;
+        network::Host::Broadcast(message);
     }
 
@@ -126,5 +150,7 @@
             if (player->getName() != player->getOldName())
             {
-                COUT(0) << "player " << player->getOldName() << " changed name to " << player->getName() << std::endl;
+                std::string message = player->getOldName() + " changed name to " + player->getName();
+                COUT(0) << message << std::endl;
+                network::Host::Broadcast(message);
             }
         }
Index: /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.h	(revision 1953)
@@ -50,4 +50,10 @@
             static void listPlayers();
 
+            inline const std::map<unsigned int, PlayerInfo*>& getClients() const
+                { return this->clients_; }
+            inline const std::set<PlayerInfo*>& getPlayers() const
+                { return this->players_; }
+            static PlayerInfo* getClient(unsigned int clientID);
+
         protected:
             virtual void clientConnected(unsigned int clientID);
Index: /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc	(revision 1953)
@@ -51,5 +51,5 @@
 
         this->ping_ = -1;
-        this->clientID_ = (unsigned int)-1;
+        this->clientID_ = network::CLIENTID_UNKNOWN;
         this->bLocalPlayer_ = Core::isStandalone();
         this->bLocalPlayer_ = false;
@@ -60,5 +60,5 @@
         this->registerVariables();
 
-        COUT(0) << "created PlayerInfo (" << this->getObjectID() << ")" << std::endl;
+//COUT(0) << "created PlayerInfo (" << this->getObjectID() << ")" << std::endl;
     }
 
@@ -68,22 +68,27 @@
         if (gametype)
             gametype->removePlayer(this);
-        COUT(0) << "destroyed PlayerInfo (" << this->getObjectID() << ")" << std::endl;
+//COUT(0) << "destroyed PlayerInfo (" << this->getObjectID() << ")" << std::endl;
     }
 
     void PlayerInfo::setConfigValues()
     {
-        SetConfigValue(playerName_, "Player").callback(this, &PlayerInfo::checkName);
+        SetConfigValue(nick_, "Player").callback(this, &PlayerInfo::checkNick);
     }
 
-    void PlayerInfo::checkName()
+    void PlayerInfo::checkNick()
     {
-std::cout << "# PI(" << this->getObjectID() << "): checkName: " << this->bLocalPlayer_ << std::endl;
-        if (this->bLocalPlayer_ && Core::isMaster())
-            this->setName(this->playerName_);
+//std::cout << "# PI(" << this->getObjectID() << "): checkName: " << this->bLocalPlayer_ << std::endl;
+        if (this->bLocalPlayer_)
+        {
+            this->playerName_ = this->nick_;
+
+            if (Core::isMaster())
+                this->setName(this->playerName_);
+        }
     }
 
     void PlayerInfo::changedName()
     {
-std::cout << "# PI(" << this->getObjectID() << "): changedName to " << this->getName() << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): changedName to " << this->getName() << std::endl;
         Gametype* gametype = Gametype::getCurrentGametype();
         if (gametype)
@@ -103,5 +108,5 @@
     void PlayerInfo::clientChangedName()
     {
-std::cout << "# PI(" << this->getObjectID() << "): clientChangedName() to " << this->playerName_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): clientChangedName() from " << this->getName() << " to " << this->playerName_ << std::endl;
         this->setName(this->playerName_);
     }
@@ -109,23 +114,23 @@
     void PlayerInfo::checkClientID()
     {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID()" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID()" << std::endl;
         this->bHumanPlayer_ = true;
 
         if (this->clientID_ == network::Host::getPlayerID())
         {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): it's the client's ID" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): it's the client's ID" << std::endl;
             this->bLocalPlayer_ = true;
+            this->playerName_ = this->nick_;
 //std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): name: " << this->getName() << std::endl;
 
             if (Core::isClient())
             {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're on a client: set object mode to bidirectional" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're on a client: set object mode to bidirectional" << std::endl;
                 this->setObjectMode(network::direction::bidirectional);
-                this->playerName_ += "blub";
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): proposed name: " << this->playerName_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): proposed name: " << this->playerName_ << std::endl;
             }
             else
             {
-std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're not on a client: finish setup" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): checkClientID(): we're not on a client: finish setup" << std::endl;
                 this->clientChangedName();
                 this->bFinishedSetup_ = true;
@@ -137,13 +142,13 @@
     void PlayerInfo::finishedSetup()
     {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): " << this->bFinishedSetup_ << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): " << this->bFinishedSetup_ << std::endl;
         if (Core::isClient())
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a client: finish setup" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a client: finish setup" << std::endl;
             this->bFinishedSetup_ = true;
         }
         else if (this->bFinishedSetup_)
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: add player" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: add player" << std::endl;
             Gametype* gametype = Gametype::getCurrentGametype();
             if (gametype)
@@ -152,5 +157,5 @@
         else
         {
-std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: client not yet finished" << std::endl;
+//std::cout << "# PI(" << this->getObjectID() << "): finishedSetup(): we're a server: client not yet finished" << std::endl;
         }
     }
Index: /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.h	(revision 1953)
@@ -60,5 +60,5 @@
             void checkClientID();
             void finishedSetup();
-            void checkName();
+            void checkNick();
             void clientChangedName();
 
@@ -70,4 +70,5 @@
 
             std::string playerName_;
+            std::string nick_;
     };
 }
Index: /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.cc
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.cc	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.cc	(revision 1953)
@@ -613,11 +613,11 @@
         @return The converted string
     */
-    /*static*/ Ogre::UTFString InGameConsole::convert2UTF(std::string s)
+    /*static*/ Ogre::UTFString InGameConsole::convert2UTF(const std::string& text)
     {
         Ogre::UTFString utf;
         Ogre::UTFString::code_point cp;
-        for (unsigned int i = 0; i < s.size(); ++i)
-        {
-          cp = s[i];
+        for (unsigned int i = 0; i < text.size(); ++i)
+        {
+          cp = text[i];
           cp &= 0xFF;
           utf.append(1, cp);
Index: /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.h
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.h	(revision 1952)
+++ /code/branches/objecthierarchy/src/orxonox/overlays/console/InGameConsole.h	(revision 1953)
@@ -61,4 +61,6 @@
         static void closeConsole();
 
+        static Ogre::UTFString convert2UTF(const std::string& text);
+
     private: // functions
         InGameConsole(const InGameConsole& other);
@@ -83,6 +85,4 @@
         // config value related
         void bHidesAllInputChanged();
-
-        static Ogre::UTFString convert2UTF(std::string s);
 
     private: // variables
Index: /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 1953)
+++ /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc	(revision 1953)
@@ -0,0 +1,117 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+#include "ChatOverlay.h"
+
+#include <OgreTextAreaOverlayElement.h>
+
+#include "core/CoreIncludes.h"
+#include "core/ConfigValueIncludes.h"
+#include "core/Executor.h"
+
+#include "network/ClientInformation.h"
+
+#include "GraphicsEngine.h"
+#include "objects/gametypes/Gametype.h"
+#include "objects/infos/PlayerInfo.h"
+#include "overlays/console/InGameConsole.h"
+#include "tools/Timer.h"
+
+#include "util/Convert.h"
+
+namespace orxonox
+{
+    CreateFactory(ChatOverlay);
+
+    ChatOverlay::ChatOverlay()
+    {
+        RegisterObject(ChatOverlay);
+
+        this->displayTime_ = 0;
+
+        this->setConfigValues();
+    }
+
+    ChatOverlay::~ChatOverlay()
+    {
+    }
+
+    void ChatOverlay::setConfigValues()
+    {
+        SetConfigValue(displayTime_, 6.0f);
+    }
+
+    void ChatOverlay::incomingChat(const std::string& message, unsigned int senderID)
+    {
+        std::string text;
+
+        if (senderID != network::CLIENTID_UNKNOWN)
+        {
+            std::string name = "unknown";
+
+            PlayerInfo* player = Gametype::getClient(senderID);
+            if (player)
+                name = player->getName();
+
+            text = name + ": " + message;
+        }
+        else
+        {
+            text = message;
+        }
+
+        this->messages_.push_back(InGameConsole::convert2UTF(text));
+        COUT(0) << "Chat: " << text << std::endl;
+
+        Timer<ChatOverlay>* timer = new Timer<ChatOverlay>;
+        ExecutorMember<ChatOverlay>* executor = createExecutor(createFunctor(&ChatOverlay::dropMessage));
+        executor->setDefaultValues(timer);
+        timer->setTimer(this->displayTime_, false, this, executor);
+
+        this->updateOverlayText();
+    }
+
+    void ChatOverlay::dropMessage(Timer<ChatOverlay>* timer)
+    {
+        this->messages_.pop_front();
+        this->updateOverlayText();
+
+        delete timer;
+    }
+
+    void ChatOverlay::updateOverlayText()
+    {
+        this->text_->setCaption("");
+
+        for (std::list<Ogre::UTFString>::reverse_iterator it = this->messages_.rbegin(); it != this->messages_.rend(); ++it)
+        {
+            this->text_->setCaption(this->text_->getCaption() + "\n" + (*it));
+        }
+    }
+}
Index: /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h
===================================================================
--- /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h	(revision 1953)
+++ /code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h	(revision 1953)
@@ -0,0 +1,61 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *                    > www.orxonox.net <
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _ChatOverlay_H__
+#define _ChatOverlay_H__
+
+#include "OrxonoxPrereqs.h"
+
+#include <OgreTextAreaOverlayElement.h>
+
+#include "network/ChatListener.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport ChatOverlay : public OverlayText, public network::ChatListener
+    {
+        public:
+            ChatOverlay();
+            ~ChatOverlay();
+
+            void setConfigValues();
+
+        protected:
+            virtual void incomingChat(const std::string& message, unsigned int senderID);
+
+            std::list<Ogre::UTFString> messages_;
+
+        private:
+            void updateOverlayText();
+            void dropMessage(Timer<ChatOverlay>* timer);
+
+            float displayTime_;
+    };
+}
+#endif /* _DebugFPSText_H__ */
