How to NOT count x-logged players?

trou

ot revolution is comming
Joined
Aug 12, 2008
Messages
1,348
Reaction score
32
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.
 

RenegadeThePox

Excellent OT User
Joined
Oct 7, 2007
Messages
58
Reaction score
1
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
 
OP
trou

trou

ot revolution is comming
Joined
Aug 12, 2008
Messages
1,348
Reaction score
32
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
 

RenegadeThePox

Excellent OT User
Joined
Oct 7, 2007
Messages
58
Reaction score
1
Server Status
Currently 291 players are Online - 310 are active and, -19 are AFK.

Dont cont the players correctly, anyone know why?
 

Xaiman

New Member
Joined
Feb 27, 2010
Messages
94
Reaction score
0
Guess my server is getting banned cuz idk how to edit the sources :( tfs 3.6
 

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
946
Reaction score
10
Location
Spain
Code:
make[1]: *** [theforgottenserver] Error 1
make[1]: Leaving directory `/home/ndgames/svn/trunk.r3671'
make: *** [all] Error 2
compiled with --enable-server-diag
 
OP
trou

trou

ot revolution is comming
Joined
Aug 12, 2008
Messages
1,348
Reaction score
32
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.
 
Top