X-Git-Url: https://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_netmsg.pas;h=8fa73f6720e4d9cc084621e929dcac0668868f28;hb=e962cbff359d8ee0abf003a2c4d0934f2a22f536;hp=e41eafed8acafacaad3e23967d10eaf806db723d;hpb=d89c8f47a07275c25006502fe98e9428be12d788;p=d2df-sdl.git diff --git a/src/game/g_netmsg.pas b/src/game/g_netmsg.pas index e41eafe..8fa73f6 100644 --- a/src/game/g_netmsg.pas +++ b/src/game/g_netmsg.pas @@ -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;