Index: code/branches/FICN/src/network/CMakeLists.txt
===================================================================
--- code/branches/FICN/src/network/CMakeLists.txt	(revision 439)
+++ code/branches/FICN/src/network/CMakeLists.txt	(revision 440)
@@ -13,4 +13,5 @@
   Server.cc
   Synchronisable.cc
+  dummyserver3.cc
 )
 
Index: code/branches/FICN/src/network/Makefile.test
===================================================================
--- code/branches/FICN/src/network/Makefile.test	(revision 439)
+++ code/branches/FICN/src/network/Makefile.test	(revision 440)
@@ -31,4 +31,6 @@
 GameStateManager.o: GameStateManager.cc
 	${CC} -c GameStateManager.cc -g ${INC}
+ClientInformation.o: ClientInformation.cc
+	${CC} -c ClientInformation.cc -g ${INC}
 
 clean:
@@ -39,2 +41,5 @@
 client: PacketGenerator.o ClientConnection.o PacketBuffer.o dummyclient2.cc 
 	${CC} dummyclient2.cc PacketGenerator.o PacketBuffer.o ClientConnection.o -o client -lenet -lboost_thread -g ${INC}
+
+chatserver: Server.o ConnectionManager.o PacketGenerator.o PacketDecoder.o PacketBuffer.o ClientInformation.o GameStateManager.o
+	${CC} dummyserver3.cc Server.o ConnectionManager.o PacketGenerator.o PacketBuffer.o GameStateManager.o ClientInformation.o -o chatserver -lenet -lboost_thread -g ${INC}
Index: code/branches/FICN/src/network/PacketDecoder.cc
===================================================================
--- code/branches/FICN/src/network/PacketDecoder.cc	(revision 439)
+++ code/branches/FICN/src/network/PacketDecoder.cc	(revision 440)
@@ -25,17 +25,17 @@
 	switch( id ) {
 	case ACK:
-		acknowledgement( packet );
+		acknowledgement( packet, clientId );
 		return true;
 		break;
 	case MOUSE:
-		mousem( packet );
+		mousem( packet, clientId );
 		return true;
 		break;
 	case KEYBOARD:
-		keystrike( packet );
+		keystrike( packet, clientId );
 		return true;
 		break;
 	case CHAT:
-		chatMessage( packet );
+		chatMessage( packet, clientId );
 		return true;
 		break;
@@ -54,5 +54,5 @@
 //following are the decode functions for the data of the packets
 
-void PacketDecoder::acknowledgement( ENetPacket* packet )
+void PacketDecoder::acknowledgement( ENetPacket* packet, int clientId )
 {
 	ack* a = new ack;
@@ -65,5 +65,5 @@
 }
 
-void PacketDecoder::mousem( ENetPacket* packet )
+void PacketDecoder::mousem( ENetPacket* packet, int clientId )
 {
 	mouse* mouseMove = new mouse;
@@ -77,5 +77,5 @@
 }
 
-void PacketDecoder::keystrike( ENetPacket* packet )
+void PacketDecoder::keystrike( ENetPacket* packet, int clientId )
 {
 	keyboard* key = new keyboard;
@@ -89,5 +89,5 @@
 }
 
-void PacketDecoder::chatMessage( ENetPacket* packet )
+void PacketDecoder::chatMessage( ENetPacket* packet, int clientId )
 {
 	chat* chatting = new chat;
@@ -104,5 +104,5 @@
 	enet_packet_destroy( packet );
 	
-	processChat( chatting ); //debug info
+	processChat( chatting, clientId ); //debug info
 	
 }
@@ -148,6 +148,6 @@
 // now the data processing functions:
 
-void PacketDecoder::processChat( chat *data){
-  printChat(data);
+void PacketDecoder::processChat( chat *data, int clientId){
+  printChat(data, clientId);
 }
 
@@ -179,6 +179,8 @@
 }
 
-void PacketDecoder::printChat( chat* data )
-{
+void PacketDecoder::printChat( chat* data, int clientId )
+{
+  if(clientId!=CLIENTID_CLIENT)
+    cout << "client: " << clientId << endl;
 	cout << "data id: " << data->id << endl;
 	cout << "data:    " << data->message << endl;
Index: code/branches/FICN/src/network/PacketManager.h
===================================================================
--- code/branches/FICN/src/network/PacketManager.h	(revision 439)
+++ code/branches/FICN/src/network/PacketManager.h	(revision 440)
@@ -5,4 +5,6 @@
 #include <enet/enet.h>
 #include "PacketTypes.h"
+
+#define CLIENTID_CLIENT -1
 
 //enum netowk generaly used to set the type ID of a packet
@@ -27,7 +29,7 @@
 	ENetPacket* mousem( double x, double y, int reliable = ENET_PACKET_FLAG_RELIABLE );
 	ENetPacket* keystrike( char press, int reliable = ENET_PACKET_FLAG_RELIABLE );
-    ENetPacket* chatMessage( const char* message, int reliable = ENET_PACKET_FLAG_RELIABLE );
-    ENetPacket* gstate( GameStateCompressed *states, int reliable = ENET_PACKET_FLAG_RELIABLE );
-    ENetPacket* clid( int classid, std::string classname, int reliable = ENET_PACKET_FLAG_RELIABLE );
+  ENetPacket* chatMessage( const char* message, int reliable = ENET_PACKET_FLAG_RELIABLE );
+  ENetPacket* gstate( GameStateCompressed *states, int reliable = ENET_PACKET_FLAG_RELIABLE );
+  ENetPacket* clid( int classid, std::string classname, int reliable = ENET_PACKET_FLAG_RELIABLE );
 private:
 };
@@ -50,15 +52,15 @@
         
 	
-    void acknowledgement( ENetPacket* packet );
-    void mousem( ENetPacket* packet );
-    void keystrike( ENetPacket* packet );
-    void chatMessage( ENetPacket* packet );
-    void gstate( ENetPacket* packet );
-    void clid( ENetPacket *packet);
+  void acknowledgement( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+  void mousem( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+  void keystrike( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+  void chatMessage( ENetPacket* packet, int clientId = CLIENTID_CLIENT);
+  void gstate( ENetPacket* packet );
+  void clid( ENetPacket *packet);
 	
   //process data
   //two functions are note yet implemented!
   //virtual void processGamestate(GameState *state);
-  virtual void processChat( chat *data);
+  virtual void processChat( chat *data, int clientId);
   virtual void processClassid( classid *cid);
   //virtual void processAck( ack *data);
@@ -68,7 +70,7 @@
 	void printMouse( mouse* data );
 	void printKey( keyboard* data );
-	void printChat( chat* data );
+	void printChat( chat* data, int clientId );
 	void printGamestate( GameStateCompressed *data );
-    void printClassid( classid *cid);
+  void printClassid( classid *cid);
 };
 }
Index: code/branches/FICN/src/network/Server.h
===================================================================
--- code/branches/FICN/src/network/Server.h	(revision 439)
+++ code/branches/FICN/src/network/Server.h	(revision 440)
@@ -38,4 +38,7 @@
     bool sendMSG(const char *msg);
     void tick();
+    protected:
+    void processQueue();
+    void updateGamestate();
     private:
     bool sendGameState();
@@ -44,6 +47,4 @@
     PacketGenerator packet_gen;
     
-    void processQueue();
-    void updateGamestate();
     ClientInformation *clients;
   };
Index: code/branches/FICN/src/network/dummyserver3.cc
===================================================================
--- code/branches/FICN/src/network/dummyserver3.cc	(revision 440)
+++ code/branches/FICN/src/network/dummyserver3.cc	(revision 440)
@@ -0,0 +1,48 @@
+#include <iostream>
+#include "Server.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+
+namespace network{
+  
+class dummyserver3 : Server{
+  public:
+  dummyserver3();
+  ~dummyserver3();
+  void loop();
+  private:
+  void tick();
+  void processChat( chat *data, int clientId);
+  
+  
+  
+};
+
+dummyserver3::dummyserver3(){
+}
+dummyserver3::~dummyserver3(){
+}
+
+void dummyserver3::loop(){
+  open();
+  while(true)
+    tick();
+}
+
+void dummyserver3::processChat( chat *data, int clientId){
+  std::cout << "Client " << clientId << " sent: " << data->message << std::endl;
+  sendMSG(data->message);
+}
+
+void dummyserver3::tick(){
+  Server::processQueue();
+}
+
+int main(int argc, char *argv[]){
+  dummyserver3 server;
+  server.loop();
+  return 0;
+}
+
+
+}
