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

How to NOT count x-logged players?

trou

ot revolution is comming
Senator
Joined
Aug 12, 2008
Messages
1,351
Reaction score
36
There is new rule on otservlist.
How to make TFS stop counting x-logged players and avoid ban?
It's really simple but will need some effort to recompile engine:

In status.cpp you need to change:
Code:
sprintf(buffer, "%d", g_game.getPlayersOnline());
to
Code:
sprintf(buffer, "%d", Connection::connectionCount);

and
Code:
output->put<uint32_t>(g_game.getPlayersOnline());
to
Code:
output->put<uint32_t>(Connection::connectionCount);

3. Now you need to compile with --enable-server-diag

Code:
rm *.o
./configure --enable-mysql --enable-server-diag
make

And...
it's everything! Now you won't get banned for x-logged characters.


If you would like to modify whoisonline.php just change text there to:

PHP:
Currently '.$number_of_players_online.' players are Online - <b>'.$config['status']['serverStatus_players'] .' are active</b> and, '.($number_of_players_online-$config['status']['serverStatus_players']).' are AFK.

--
Don Daniello: This change has been applied to the TFS 0.3.7 as of revision 5682. If you are using any later versions, you do not need to follow this tutorial. Additionally, is is achieved in a safer way.
 
i cant compile it... TFS 0.4

status.cpp: In member function âstd::string Status::getStatusString(bool) constâ:
status.cpp:138: error: âconnectionCountâ is not a member of âConnectionâ
status.cpp: In member function âvoid Status::getInfo(uint32_t, OutputMessage_ptr, NetworkMessage&) constâ:
status.cpp:236: error: âconnectionCountâ is not a member of âConnectionâ



make[1]: *** [status.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/spawn.Tpo .deps/spawn.Po
mv -f .deps/protocolgame.Tpo .deps/protocolgame.Po
mv -f .deps/spells.Tpo .deps/spells.Po
mv -f .deps/textlogger.Tpo .deps/textlogger.Po
mv -f .deps/server.Tpo .deps/server.Po
mv -f .deps/thing.Tpo .deps/thing.Po
mv -f .deps/teleport.Tpo .deps/teleport.Po
mv -f .deps/talkaction.Tpo .deps/talkaction.Po
make[1]: Leaving directory `/home/wakesoft/evoserver/trunk.r3704'
make: *** [all] Error 2
 
i cant compile it... TFS 0.4

status.cpp: In member function âstd::string Status::getStatusString(bool) constâ:
status.cpp:138: error: âconnectionCountâ is not a member of âConnectionâ
status.cpp: In member function âvoid Status::getInfo(uint32_t, OutputMessage_ptr, NetworkMessage&) constâ:
status.cpp:236: error: âconnectionCountâ is not a member of âConnectionâ



make[1]: *** [status.o] Error 1
make[1]: *** Waiting for unfinished jobs....
mv -f .deps/spawn.Tpo .deps/spawn.Po
mv -f .deps/protocolgame.Tpo .deps/protocolgame.Po
mv -f .deps/spells.Tpo .deps/spells.Po
mv -f .deps/textlogger.Tpo .deps/textlogger.Po
mv -f .deps/server.Tpo .deps/server.Po
mv -f .deps/thing.Tpo .deps/thing.Po
mv -f .deps/teleport.Tpo .deps/teleport.Po
mv -f .deps/talkaction.Tpo .deps/talkaction.Po
make[1]: Leaving directory `/home/wakesoft/evoserver/trunk.r3704'
make: *** [all] Error 2

You are not compiling with --enable-server-diag
 
Server Status
Currently 291 players are Online - 310 are active and, -19 are AFK.

Dont cont the players correctly, anyone know why?
 
Guess my server is getting banned cuz idk how to edit the sources :( tfs 3.6
 
Code:
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/ndgames/svn/trunk.r3671'
make: *** [all] Error 2

compiled with --enable-server-diag
 
Code:
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/ndgames/svn/trunk.r3671'
make: *** [all] Error 2

compiled with --enable-server-diag

but still I don't see the error message :) only error code.
 
Back
Top