rnd-20031011-3-src
[rocksndiamonds.git] / src / netserv.c
index ac142763b2eff1b465674018c7f85ee3fbca4759..11fd9bc864c4bb528f62c00f776bc23c1b65d894 100644 (file)
@@ -1,31 +1,33 @@
 /***********************************************************
-*  Rocks'n'Diamonds -- McDuffin Strikes Back!              *
+* Rocks'n'Diamonds -- McDuffin Strikes Back!               *
 *----------------------------------------------------------*
-*  (c) 1995-98 Artsoft Entertainment                       *
-*              Holger Schemel                              *
-*              Oststrasse 11a                              *
-*              33604 Bielefeld                             *
-*              phone: ++49 +521 290471                     *
-*              email: aeglos@valinor.owl.de                *
+* (c) 1995-2002 Artsoft Entertainment                      *
+*               Holger Schemel                             *
+*               Detmolder Strasse 189                      *
+*               33604 Bielefeld                            *
+*               Germany                                    *
+*               e-mail: info@artsoft.org                   *
 *----------------------------------------------------------*
-*  network.c                                               *
+* network.c                                                *
 ***********************************************************/
 
-#ifndef MSDOS
+#include "libgame/platform.h"
+
+#if defined(PLATFORM_UNIX)
 
 #include <fcntl.h>
 #include <sys/time.h>
 #include <signal.h>
 #include <sys/socket.h>
 #include <errno.h>
-#include <string.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 #include <netdb.h>
 
+#include "libgame/libgame.h"
+
 #include "netserv.h"
-#include "misc.h"
 
 static int clients = 0;
 static int onceonly = 0;
@@ -375,7 +377,7 @@ static void Handle_OP_STOP_PLAYING(struct NetworkServerPlayerInfo *player)
   broadcast(NULL, 2, 0);
 }
 
-static void Handle_OP_MOVE_FIGURE(struct NetworkServerPlayerInfo *player)
+static void Handle_OP_MOVE_PLAYER(struct NetworkServerPlayerInfo *player)
 {
   struct NetworkServerPlayerInfo *v;
   int last_client_nr = 0;
@@ -475,7 +477,7 @@ void NetworkServer(int port, int serveronly)
   if (is_daemon)
   {
     /* become a daemon, breaking all ties with the controlling terminal */
-    options.verbose = 0;
+    options.verbose = FALSE;
     for (i=0; i<255; i++)
     {
       if (i != lfd)
@@ -633,8 +635,8 @@ void NetworkServer(int port, int serveronly)
              Handle_OP_STOP_PLAYING(player);
              break;
 
-           case OP_MOVE_FIGURE:
-             Handle_OP_MOVE_FIGURE(player);
+           case OP_MOVE_PLAYER:
+             Handle_OP_MOVE_PLAYER(player);
              break;
 
            case OP_BROADCAST_MESSAGE:
@@ -661,4 +663,4 @@ void NetworkServer(int port, int serveronly)
   }
 }
 
-#endif /* !MSDOS */
+#endif /* PLATFORM_UNIX */