Index: /branches/proxy/src/lib/network/ip.cc
===================================================================
--- /branches/proxy/src/lib/network/ip.cc	(revision 9425)
+++ /branches/proxy/src/lib/network/ip.cc	(revision 9426)
@@ -185,7 +185,7 @@
     IPaddress ipaddr;
 
-    SDLNet_ResolveHost(&ipaddr, NULL, 2000);
-
-    return IP(ipaddr.host, port);
+    SDLNet_ResolveHost(&ipaddr, ip.c_str(), port);
+
+    return IP(ipaddr);
   }
   else
@@ -255,14 +255,14 @@
 /**
  * @brief converts a IP into a String (without port).
- * @param ip the IP to put into the string.
+ * @param host the IP to put into the string.
  * @param port -1 if not wanted
  * @return the string of the ip.
  */
-std::string IP::ipToString(int ip, int port)
-{
-  MultiType part0((int) (ip & 0xFF000000) >> 24);
-  MultiType part1((int) (ip & 0x00FF0000) >> 16);
-  MultiType part2((int) (ip & 0x0000FF00) >>  8);
-  MultiType part3((int) (ip & 0x000000FF) );
+std::string IP::ipToString(int host, int port)
+{
+  MultiType part0((int) ((host & 0xFF000000) >> 24));
+  MultiType part1((int) ((host & 0x00FF0000) >> 16));
+  MultiType part2((int) ((host & 0x0000FF00) >>  8));
+  MultiType part3((int) ((host & 0x000000FF) ));
 
   std::string addr = part3.getString() + "." + part2.getString() + "." +
Index: /branches/proxy/src/lib/network/ip.h
===================================================================
--- /branches/proxy/src/lib/network/ip.h	(revision 9425)
+++ /branches/proxy/src/lib/network/ip.h	(revision 9426)
@@ -54,5 +54,5 @@
 
     static std::string ipToString(const IPaddress& ipaddr);
-    static std::string ipToString(int ip, int port = -1);
+    static std::string ipToString(int host, int port = -1);
 
     static void setDefaultPort(int defaultPort);
Index: /branches/proxy/src/lib/network/monitor/network_monitor.cc
===================================================================
--- /branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9425)
+++ /branches/proxy/src/lib/network/monitor/network_monitor.cc	(revision 9426)
@@ -57,11 +57,11 @@
   {
     // assuming that the config files are already read we get the proxy servers
-    std::vector<IPaddress*>* proxyList = NetworkSettings::getInstance()->getProxyList();
-    std::vector<IPaddress*>::iterator it = proxyList->begin();
+    std::vector<IP>* proxyList = NetworkSettings::getInstance()->getProxyList();
+    std::vector<IP>::iterator it = proxyList->begin();
     // create a peer info class and a network node class for each new proxy and add them to the passive list
     for(; it < proxyList->end(); it++)
     {
       PeerInfo* peer = new PeerInfo();
-      peer->ip = *(*it);
+      peer->ip = (*it);
       peer->nodeType = NET_PROXY_SERVER_ACTIVE;
       peer->userId = -1;
Index: /branches/proxy/src/lib/network/proxy/network_settings.cc
===================================================================
--- /branches/proxy/src/lib/network/proxy/network_settings.cc	(revision 9425)
+++ /branches/proxy/src/lib/network/proxy/network_settings.cc	(revision 9426)
@@ -51,9 +51,8 @@
 
   // remove all unused proxy data again
-  for( int i = 0; i < this->proxies.size(); i++)
+  for(unsigned int i = 0; i < this->proxies.size(); i++)
   {
-    IPaddress* ip = this->proxies.back();
+    IP ip = this->proxies.back();
     this->proxies.pop_back();
-    delete ip;
   }
 }
@@ -139,9 +138,9 @@
     return;
 
-  IPaddress *ip = new IPaddress;
+  IP ip(proxyAddr, 9999);
+  printf("========== ");
+  ip.debug();
 
-  SDLNet_ResolveHost( ip, proxyAddr.c_str(), 9999 );
-
-  this->proxies.push_back(ip);
+  this->proxies.push_back(ip);//IP(proxyAddr, 9999));
 }
 
Index: /branches/proxy/src/lib/network/proxy/network_settings.h
===================================================================
--- /branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9425)
+++ /branches/proxy/src/lib/network/proxy/network_settings.h	(revision 9426)
@@ -48,5 +48,5 @@
     void setProxyAddr(const std::string& proxyAddr);
     /** @returns the list of proxy servers from the init file */
-    inline std::vector<IPaddress*>* getProxyList() { return &this->proxies; }
+    inline std::vector<IP>* getProxyList() { return &this->proxies; }
 
 
@@ -61,5 +61,5 @@
     float                        maxPlayerSaturation;     //!< the saturation level from where on the proxy server should be activated
 
-    std::vector<IPaddress*>      proxies;                 //!< all registered proxies
+    std::vector<IP>              proxies;                 //!< all registered proxies
     IP                           masterServer;            //!< master server ip address
 
