Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[Bug Fix] Correcting Severe Connection Error


Valentine90
 Share

Recommended Posts

**Sorry my english**

Seems a little mistake, this is one of the most most dangerous bugs that I've seen, this is the fix that can not miss in your game because it is an important thing is the connection between the client and server. The _Eclipse Origins_ and derivatives have an anti flood system that prevents overloads the server, so that a player can only occupy a maximum of 1000 bytes per second in memory of the server computer, and also you only can send and 25 messages receive between client and server, this is great, but has a big problem, even if a player is not a hacker, one time or another depending on the system, the player can unwittingly exceed these limits, the problem is that when you pass that limit, NEVER MORE you can receive anything from the server, forcing to the player having to disconnect and try a new connection to the server. This error went unnoticed because not it happens this problem with players admins.

**Open Server**

**1 -** In **modServerTCP**, search for:

```
If GetPlayerAccess(index) <= 0 Then

' Check for data flooding

If TempPlayer(index).DataBytes > 1000 Then

Exit Sub

End If

' Check for packet flooding

If TempPlayer(index).DataPackets > 25 Then

Exit Sub

End If

End If
```

**2 -** Replace by:

```
If GetPlayerAccess(index) <= 0 Then

' Check for data flooding

If TempPlayer(index).DataBytes > 1000 Then

If GetTickCount < TempPlayer(index).DataTimer Then

Exit Sub

End If

End If

' Check for packet flooding

If TempPlayer(index).DataPackets > 25 Then

If GetTickCount < TempPlayer(index).DataTimer Then

Exit Sub

End If

End If

End If
```

**Credits:**

Valentine
Link to comment
Share on other sites

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...