Very important - Rules change on otservlist.org

Homeslice

-anoyn/Rage the Mage
Joined
May 9, 2010
Messages
114
Best answers
2
Reaction score
52
Location
Canada
I added not counting afk players to gunz's version.
So with this you can have no logout zones or above 15 min kick time and still be within otservlist rules.
This also has gunz's not counting more than 4 mcs per IP.

protocolstatus.cpp (TFS 1.0/1.1/1.2) (1.3 Version available below)

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->getIdleTime() < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
For TFS 1.3
protocolstatus.cpp

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->idleTime < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
in player.h move

C++:
int32_t idleTime = 0;
from the private: section to below "public:" (up)
 

Night Wolf

I don't bite.
Joined
Feb 10, 2008
Messages
158
Best answers
3
Reaction score
95
this so arbitrary and honestly, very pointless. Otservlist can't stand a chance against IA algorithms. I have testing a few on my personal server and it took me a year to get banned (by manual reporting). Focus your efforts into a better way to rank servers instead of forcing owners
 

Sir Sezago

Scripter/Developer
Joined
Aug 28, 2017
Messages
274
Best answers
0
Reaction score
16
On Monday 5/12/2016 we will start enforcing a new rule on otservlist concerning the number of allowed multi clients counted from a single IP address. Servers are not allowed to count more than 4 multi clients as real players.
As "multi client" we define multiple characters logged in from a single IP address.
As "real players" we mean the number of players online which is returned to otservlist website using the status protocol.

All servers are asked to make necessary changes in their code or apply a global multi client limit (4 connections/IP) for example by using the following iptables rule:
iptables -A INPUT -p tcp --dport GAME_PORT -m connlimit --connlimit-above 4 -j DROP
When applying the above iptable rule, please change GAME_PORT to your server's game port (default: 7172).

What is the reasoning behind this change? Unfortunately we are forced to start enforcing such rule because some server owners started encouraging people to log in as many multi clients as possible.
While we performed our tests, we found out servers, where 10 players logged in 250 (!!!) characters. Of course reporting that there are 250 players online while in fact there are 10 unique people controlling them is false advertising and shouldn't be allowed. Your potential players visiting our website deserve the correct information about the server.

If you need further info, please contact us using the following form: http://otservlist.org/contact.

Working code for TFS 1.0/1.1/1.2 which limits counting multi clients in status protocol from Gunz:
Very important - Rules change on otservlist.org (https://otland.net/threads/very-important-rules-change-on-otservlist-org.247531/page-3#post-2407794)
how can i install this ?? linux ubuntu 14.04 tfs 0.4 sources edit or ? what
 

roriscrave

Intermediate OT User
Joined
Dec 7, 2011
Messages
714
Best answers
17
Reaction score
83
I added not counting afk players to gunz's version.
So with this you can have no logout zones or above 15 min kick time and still be within otservlist rules.
This also has gunz's not counting more than 4 mcs per IP.

protocolstatus.cpp (TFS 1.0/1.1/1.2) (1.3 Version available below)

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->getIdleTime() < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
For TFS 1.3
protocolstatus.cpp

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->idleTime < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
in player.h move

C++:
int32_t idleTime = 0;
from the private: section to below "public:" (up)
I'm sorry to revive the topic, but I tested this script on a server 1.3 and got banned (I don't use no-logout zones, I use kick every 15 minutes).
I realized that the game was with exit trainer (but from what you said I was not supposed to have problems).
I had problems, I removed the exit trainer, and I'm waiting for the otlist ban to go out to test again. But it seems to me that this function is not functional, someone else tested?
 

Stellow

C++/C#/PHP/LUA
Joined
Oct 23, 2008
Messages
1,019
Best answers
0
Reaction score
132
Location
Germany
I added not counting afk players to gunz's version.
So with this you can have no logout zones or above 15 min kick time and still be within otservlist rules.
This also has gunz's not counting more than 4 mcs per IP.

protocolstatus.cpp (TFS 1.0/1.1/1.2) (1.3 Version available below)

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->getIdleTime() < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
For TFS 1.3
protocolstatus.cpp

Change:
C++:
players.append_attribute("online") = std::to_string(g_game.getPlayersOnline()).c_str();
to

C++:
uint32_t real = 0;

std::map<uint32_t, uint32_t> listIP;

for (const auto& it : g_game.getPlayers()) {
    if (it.second->idleTime < 960000 && it.second->getIP() != 0) {
        auto ip = listIP.find(it.second->getIP());
        if (ip != listIP.end()) {
            listIP[it.second->getIP()]++;
            if (listIP[it.second->getIP()] < 5) {
                real++;
            }
        }
        else {
            listIP[it.second->getIP()] = 1;
            real++;
        }
    }
}
players.append_attribute("online") = std::to_string(real).c_str();
in player.h move

C++:
int32_t idleTime = 0;
from the private: section to below "public:" (up)
When is the variable idleTime updated on TFS 1.3? That is probably why our friend below got banned.

I'm sorry to revive the topic, but I tested this script on a server 1.3 and got banned (I don't use no-logout zones, I use kick every 15 minutes).
I realized that the game was with exit trainer (but from what you said I was not supposed to have problems).
I had problems, I removed the exit trainer, and I'm waiting for the otlist ban to go out to test again. But it seems to me that this function is not functional, someone else tested?
 
Top