Index: code/branches/masterserver/src/modules/masterserver/MasterServer.cpp
===================================================================
--- code/branches/masterserver/src/modules/masterserver/MasterServer.cpp	(revision 7574)
+++ code/branches/masterserver/src/modules/masterserver/MasterServer.cpp	(revision 7580)
@@ -41,7 +41,7 @@
 
   /* output debug info */
-  printf( "A new client connected from %x:%u.\n", 
-      event->peer->address.host,
-      event->peer->address.port);
+  //printf( "A new client connected from %x:%u.\n", 
+      //event->peer->address.host,
+      //event->peer->address.port);
 
   /* game server or client connection? */
@@ -69,5 +69,5 @@
 
   /* output that the disconnect happened, to be removed at a later time. */
-  printf ("%s disconnected.\n", event.peer -> data);
+  //printf ("%s disconnected.\n", event->peer -> data);
 
   /* remove the server from the list it belongs to */
@@ -87,9 +87,9 @@
 
   /* output debug info about the data that has come, to be removed */
-  printf( "A packet of length %u containing %s was received from %s on channel %u.\n",
-      event->packet->dataLength,
-      event->packet->data,
-      event->peer->data,
-      event->channelID );
+  //printf( "A packet of length %u containing %s was received from %s on channel %u.\n",
+      //event->packet->dataLength,
+      //event->packet->data,
+      //event->peer->data,
+      //event->channelID );
  
   /* game server or client connection? */
@@ -155,5 +155,5 @@
 
   /***** ENTER MAIN LOOP *****/
-  ENetEvent *event = calloc(sizeof(ENetEvent), sizeof(char));
+  ENetEvent *event = (ENetEvent *)calloc(sizeof(ENetEvent), sizeof(char));
   if( event == NULL )
   { fprintf( stderr, "Could not create ENetEvent structure, exiting.\n" );
Index: code/branches/masterserver/src/modules/masterserver/PeerList.cpp
===================================================================
--- code/branches/masterserver/src/modules/masterserver/PeerList.cpp	(revision 7574)
+++ code/branches/masterserver/src/modules/masterserver/PeerList.cpp	(revision 7580)
@@ -28,4 +28,5 @@
 
 #include "PeerList.h"
+#include <cstdio>
 
 namespace orxonox
@@ -36,25 +37,47 @@
   int 
   PeerList::addPeer( ENetPeer *toadd )
-  {
+  { /* error correction */
+    if( toadd == NULL ) 
+    { fprintf( stderr, "PeerList::addPeer: empty peer given.\n" );
+      return -1;
+    }
 
-
+    /* if all went well, push to back of list */
+    this->peerlist.push_back( toadd );
     return 0;
   }
 
-  int 
+  bool sub_compAddr( ENetAddress addr1, ENetAddress addr2 )
+  { return ( (addr1.host == addr2.host) && (addr1.port == addr2.port) ); }
+
+  bool
   PeerList::remPeerByAddr( ENetAddress addr )
-  {
+  { /* get an iterator */
+    list<packet::ENetPeer *>::iterator i;
 
+    /* loop through list elements */
+    for( i = peerlist.begin(); i != peerlist.end(); ++i ) 
+      if( sub_compAddr((*i)->address, addr ) )
+      { /* found this name, remove and quit */
+        this->peerlist.remove( i );
+        return true;
+      }
 
-
-    return 0;
+    /* not found */
+    return false;
   }
 
   ENetPeer *
   PeerList::findPeerByAddr( ENetAddress addr )
-  {
+  { /* get an iterator */
+    list<packet::ENetPeer *>::iterator i;
 
+    /* loop through list elements */
+    for( i = peerlist.begin(); i != peerlist.end(); ++i ) 
+      if( sub_compAddr((*i)->address, addr ) )
+        /* found this name, remove and quit */
+        return i;
 
-
+    /* not found */
     return NULL;
   }
Index: code/branches/masterserver/src/modules/masterserver/PeerList.h
===================================================================
--- code/branches/masterserver/src/modules/masterserver/PeerList.h	(revision 7574)
+++ code/branches/masterserver/src/modules/masterserver/PeerList.h	(revision 7580)
@@ -49,4 +49,5 @@
 
       /** \param toadd The peer to add
+       * \return 0 for success, -1 for error.
        * 
        * Add new peer to list 
@@ -55,8 +56,9 @@
 
       /** \param addr Address to look for
+       * \return if the peer was found or not
        * 
        * Remove peer from list by address 
        */
-      int remPeerByAddr( ENetAddress addr );
+      bool remPeerByAddr( ENetAddress addr );
 
       /** \param addr The address to find by
