DEADSOFTWARE

system: remove sys_GetTicks
[d2df-sdl.git] / src / game / g_netmsg.pas
index e41eafed8acafacaad3e23967d10eaf806db723d..8fa73f6720e4d9cc084621e929dcac0668868f28 100644 (file)
@@ -284,8 +284,8 @@ function IsValidFilePath(const S: String): Boolean;
 implementation
 
 uses
-  Math, ENet, e_input, e_graphics, e_log,
-  g_textures, g_gfx, g_sound, g_console, g_basic, g_options, g_main,
+  Math, ENet, e_input, e_log, g_base, g_basic,
+  g_textures, g_gfx, g_sound, g_console, g_options,
   g_game, g_player, g_map, g_panel, g_items, g_weapons, g_phys, g_gui,
   g_language, g_monsters, g_netmaster, utils, wadreader, MAPDEF;
 
@@ -341,7 +341,7 @@ procedure MH_MalformedPacket(C: pTNetClient);
 begin
   g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
     _lc[I_NET_DISC_PROTOCOL]);
-  enet_peer_disconnect(C^.Peer, NET_DISC_PROTOCOL);
+  g_Net_Host_Kick(C^.ID, NET_DISC_PROTOCOL);
 end;
 
 procedure MH_RECV_Chat(C: pTNetClient; var M: TMsg);
@@ -414,7 +414,7 @@ begin
   begin
     g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
       _lc[I_NET_DISC_VERSION]);
-    enet_peer_disconnect(C^.Peer, NET_DISC_VERSION);
+    g_Net_Host_Kick(C^.ID, NET_DISC_VERSION);
     Exit;
   end;
 
@@ -424,13 +424,13 @@ begin
     begin
       g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
         _lc[I_NET_DISC_BAN]);
-      enet_peer_disconnect(C^.Peer, NET_DISC_BAN);
+      g_Net_Host_Kick(C^.ID, NET_DISC_BAN);
     end
     else
     begin
       g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
         _lc[I_NET_DISC_BAN]);
-      enet_peer_disconnect(C^.Peer, NET_DISC_TEMPBAN);
+      g_Net_Host_Kick(C^.ID, NET_DISC_TEMPBAN);
     end;
     Exit;
   end;
@@ -440,7 +440,7 @@ begin
     begin
       g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
         _lc[I_NET_DISC_PASSWORD]);
-      enet_peer_disconnect(C^.Peer, NET_DISC_PASSWORD);
+      g_Net_Host_Kick(C^.ID, NET_DISC_PASSWORD);
       Exit;
     end;