Index: code/branches/objecthierarchy/src/orxonox/CMakeLists.txt
===================================================================
--- code/branches/objecthierarchy/src/orxonox/CMakeLists.txt	(revision 1950)
+++ 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 1950)
+++ 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 1950)
+++ 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 1950)
+++ 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 1950)
+++ 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 1950)
+++ 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 1950)
+++ 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__ */
