• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ Otclientv8 issues, kicking players

Mjmackan

Mapper ~ Writer
Premium User
Joined
Jul 18, 2009
Messages
1,424
Solutions
15
Reaction score
177
Location
Sweden
I know I've talked about this before, but I cant seem to figure it out.
Players are now getting kicked on my server, randomly without any bugs/crashes, it happened this season and never before, could it be that I have added too craving spells or something? It feels like they get kicked because they limit the packets but how do i know this?

When they try to relog they get this error from the otcv8 console:
Lua:
Login to gamefate.eu:7172
ERROR: protected lua call failed: C++ call failed: Unable to login into a world while already online or logging.
stack traceback:
    [builtin#146]: at 0x00dc6880
    [C]: in function 'loginWorld'
    /modules/client_entergame/characterlist.lua:33: in function 'tryLogin'
    /modules/client_entergame/characterlist.lua:391: in function 'doLogin'
    ...ules/client_entergame/characterlist.otui:122: [@onClick]:2: in function <...ules/client_entergame/characterlist.otui:122: [@onClick]:1>
 
otclient allow a lot of actions to be done and sent to server side without any kinda of limitation (like cip client does, limiting actions to 1s in some occasions).

this sends thousands of packets per second to the server, and your config.lua is set to accept possibly only 40 packets per second. If the player exceeds it, it gets kicked. The error you see is upon reloging.

The root cause is adding delays to actions inside the client so people don't spam packets, the easy fix is putting 1000000 in packet limit in your config.lua but you need to be aware that this will make your server try to cope with such a large amount of requests for EACH player.
I'd heavily go in favor of increasing a bit the number for the sake of testing but still use moderate amount in a production server (~60 at max possibly depending on your configurations)
 
Last edited:
otclient allow a lot of actions to be done and sent to server side without any kinda of limitation (like cip client does, limiting actions to 1s in some occasions).

this sends thousands of packets per second to the server, and your config.lua is set to accept possibly only 40 packets per second. If the player exceeds it, it gets kicked. The error you see is upon reloging.

The root cause is adding delays to actions inside the client so people don't spam packets, the easy fix is putting 1000000 in packet limit in your config.lua.
I have 6000 in my config right now, how cant that be enough?
Edit: whats the hard fix?
 
Last edited:
The root cause is adding delays to actions inside the client so people don't spam packets, the easy fix is putting 1000000 in packet limit in your config.lua.
Don't you think that limit is there for a reason, or just for teh lulz?
If you do, then maybe elaborate how this change can affect his server before you suggest he changes it to some cosmic number.
 
typical tfs dev bad coding example here we go again 🤡

Now for real, if you change your packet limit too high your server will be vulnerable, you don't want to parse 6000 packets for each player, each second.
Even if you send things like cursor position/click you should be fine within a limit of 50 packets.

@topic
I had a similar issue once, but it was due to the changes I've done myself, not the otc itself.
  • If you use git - just checkout to some point in time and see when the issue arose and which changes might have caused it.
  • If you were ignorant enough to spend your time coding without it/not using linux/other kind of "not that smart" - you can also use WinMerge.
    But it's way worse, starting your project from scratch might be less painful than using it.
Thats what I felt aswell and what Im into, I have a git, but its been outdated for sometime. What type of scripts could be more resource taking than others? It seems to only happen to specific higher leveld players, if there's a way to print or point out packets used in any way? Or print their actions?

I was gonna say you understimate the intelligence of the OP by assuming he wouldn't understand the reason for such limit, but after his reply saying it was already 6k I agree with you.
Im fully aware that sending a million packets isn't "good" for the server, neither is 6000. I set 6000 recently as a test to figure out if it would make any difference and was more a pointer towards you that it isn't a solution to the problem. I fully understand your irony in the first post, however that post aswell was a statement to a statement, pretty much irrelevant. (See you edited first post now however with less đź’©)
 
Back
Top