summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1ff17b7)
raw | patch | inline | side by side (parent: 1ff17b7)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 21 Mar 2022 15:56:07 +0000 (18:56 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Mon, 21 Mar 2022 15:56:07 +0000 (18:56 +0300) |
src/game/g_net.pas | patch | blob | history |
diff --git a/src/game/g_net.pas b/src/game/g_net.pas
index 249ef8a05f51eca4269c778fd56e03f6987b3779..d8fc0046f58eaa49addd1c9d4bf228f78508a985 100644 (file)
--- a/src/game/g_net.pas
+++ b/src/game/g_net.pas
Port := NetEvent.Peer^.address.port;
g_Console_Add(_lc[I_NET_MSG] +
Format(_lc[I_NET_MSG_HOST_CONN], [IP, Port]));
+ e_WriteLog('NET: Connection request from ' + IP + '.', TMsgType.Notify);
if (NetEvent.data <> NET_PROTOCOL_VER) then
begin
g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
_lc[I_NET_DISC_PROTOCOL]);
+ e_WriteLog('NET: Connection request from ' + IP + ' rejected: version mismatch',
+ TMsgType.Notify);
NetEvent.peer^.data := GetMemory(SizeOf(Byte));
Byte(NetEvent.peer^.data^) := 255;
enet_peer_disconnect(NetEvent.peer, NET_DISC_PROTOCOL);
begin
g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
_lc[I_NET_DISC_BAN]);
+ e_WriteLog('NET: Connection request from ' + IP + ' rejected: banned',
+ TMsgType.Notify);
NetEvent.peer^.data := GetMemory(SizeOf(Byte));
Byte(NetEvent.peer^.data^) := 255;
enet_peer_disconnect(NetEvent.Peer, NET_DISC_BAN);
begin
g_Console_Add(_lc[I_NET_MSG] + _lc[I_NET_MSG_HOST_REJECT] +
_lc[I_NET_DISC_FULL]);
+ e_WriteLog('NET: Connection request from ' + IP + ' rejected: server full',
+ TMsgType.Notify);
NetEvent.Peer^.data := GetMemory(SizeOf(Byte));
Byte(NetEvent.peer^.data^) := 255;
enet_peer_disconnect(NetEvent.peer, NET_DISC_FULL);