• 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!

C++ [TFS 0.4] Save CountOfCharacters per IP

mameca123

www.TheHeroesOfTime.com
Joined
Nov 19, 2008
Messages
37
Reaction score
8
Hello,

I'd like to know an easier way to create - on the server opening moment - a list where the index is each player IP address and the list[IP] returns the number of characters online (no EXIT) using such IP address.

The idea is to create an ANTI-MC system on protocolgame.cpp.

Nowadays, I am running an non-optimized check. For every login, I check the player's IP and I loop through every player online to get their address. If IP address is equal to the login-character's IP address, I increment a count variable. If >= 4, I send a message window to the player saying that he has already 4 characters online, and refuse the login. This was done in lua via creaturescripts before but it was way less optimized. But I'd like to optimize it more (as my idea above).

How it is done nowadays:
1669315953086.png
 
I have a question: this code you made is working fine so far, right? But what if someone uses a program like VPN to bypass IP and create multiple accounts... what can we do about it?
if u're usiong otc you can collect machine uid and require email verification everytime someone login from new machine, its still not 100% scam proof but way harder to avoid.
 
Back
Top