Index: code/branches/output/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/output/src/libraries/network/MasterServer.cc	(revision 8739)
+++ code/branches/output/src/libraries/network/MasterServer.cc	(revision 8807)
@@ -38,5 +38,6 @@
   helper_output_debug( ENetEvent *event, char *addrconv )
   {
-    COUT(4) << "A packet of length" 
+    orxout(verbose, context::master_server)
+      << "A packet of length" 
       << event->packet->dataLength
       << " containing "
@@ -45,5 +46,5 @@
       << addrconv 
       << " on channel "
-      << event->channelID << "\n";
+      << event->channelID << endl;
   }
 
@@ -66,5 +67,5 @@
           + MSPROTO_SERVERLIST_ITEM_LEN + 2,1 );
       if( !tosend ) 
-      { COUT(2) << "Masterserver.cc: Memory allocation failed.\n";
+      { orxout(internal_warning, context::master_server) << "Masterserver.cc: Memory allocation failed." << endl;
         continue;
       } 
@@ -108,5 +109,5 @@
   { /* check for bad parameters */
     if( !event )
-    { COUT(2) << "MasterServer::eventConnect: No event given.\n" ;
+    { orxout(internal_warning, context::master_server) << "MasterServer::eventConnect: No event given." << endl;
       return -1;
     }
@@ -117,8 +118,8 @@
 
     /* output debug info */
-    COUT(4) << "A new client connected from " 
+    orxout(verbose, context::master_server) << "A new client connected from " 
       << addrconv 
       << " on port " 
-      << event->peer->address.port << "\n";
+      << event->peer->address.port << endl;
 
     /* store string form of address here */
@@ -134,10 +135,10 @@
   { /* check for bad parameters */
     if( !event )
-    { COUT(2) << "No event given.\n";
+    { orxout(internal_warning, context::master_server) << "No event given." << endl;
       return -1;
     }
 
     /* output that the disconnect happened */
-    COUT(4) << (char*)event->peer->data << " disconnected.\n";
+    orxout(verbose, context::master_server) << (char*)event->peer->data << " disconnected." << endl;
 
     /* create string from peer data */
@@ -159,5 +160,5 @@
   { /* validate packet */
     if( !event || !(event->packet) || !(event->peer) )
-    { COUT(2) << "No complete event given.\n";
+    { orxout(internal_warning, context::master_server) << "No complete event given." << endl;
       return -1;
     }
@@ -182,6 +183,6 @@
         
         /* tell people we did so */
-        COUT(2) << "Added new server to list: " << 
-          packet::ServerInformation( event ).getServerIP() << "\n";
+        orxout(internal_info, context::master_server) << "Added new server to list: " << 
+          packet::ServerInformation( event ).getServerIP() << endl;
       }
 
@@ -197,5 +198,5 @@
 
         /* tell the user */
-        COUT(2) << "Removed server " << name << " from list.\n";
+        orxout(internal_info, context::master_server) << "Removed server " << name << " from list." << endl;
       }
 
@@ -230,5 +231,5 @@
     if( event == NULL )
     { 
-      COUT(1) << "Could not create ENetEvent structure, exiting.\n";
+      orxout(user_error, context::master_server) << "Could not create ENetEvent structure, exiting." << endl;
       exit( EXIT_FAILURE );
     }
@@ -263,5 +264,5 @@
     /***** INITIALIZE NETWORKING *****/
     if( enet_initialize () != 0)
-    { COUT(1) << "An error occurred while initializing ENet.\n";
+    { orxout(user_error, context::master_server) << "An error occurred while initializing ENet." << endl;
       exit( EXIT_FAILURE );
     }
@@ -285,6 +286,6 @@
     /* see if creation worked */
     if( !this->server )
-    { COUT(1) << 
-        "An error occurred while trying to create an ENet server host.\n";
+    { orxout(user_error, context::master_server) << 
+        "An error occurred while trying to create an ENet server host." << endl;
       exit( EXIT_FAILURE );
     }
@@ -294,5 +295,5 @@
 
     /* tell people we're now initialized */
-    COUT(0) << "MasterServer initialized, waiting for connections.\n";
+    orxout(internal_status, context::master_server) << "MasterServer initialized, waiting for connections." << endl;
   }
 
