• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

TFS 0.X how does xcode works?

Lurk

Active Member
Joined
Dec 4, 2017
Messages
336
Reaction score
49
I remember a friend of mine told me to compile my sources using xcode (that thing from otlist) so I wouldn't get banned, I kinda of want to remove the MC limit in my server but I'm scared I might get banned again
 
Solution
You will have also to replace this in your status.cpp
C++:
sprintf(buffer, "%d", g_game.getPlayersOnline());
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
remove and add this one instead
C++:
uint32_t real = 0;
std::map<uint32_t, uint32_t> listIP;
for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) {
   if (it->second->getIP() != 0) {
        if (listIP.find(it->second->getIP()) != listIP.end()) {
             listIP[it->second->getIP()]++;
             if (listIP[it->second->getIP()] < 5) {
               real++;
             }
         } else {
           listIP[it->second->getIP()] = 1;
             real++;
         }
       }
}
sprintf(buffer, "%d", real)...
 
You will have also to replace this in your status.cpp
C++:
sprintf(buffer, "%d", g_game.getPlayersOnline());
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
remove and add this one instead
C++:
uint32_t real = 0;
std::map<uint32_t, uint32_t> listIP;
for(AutoList<Player>::iterator it = Player::autoList.begin(); it != Player::autoList.end(); ++it) {
   if (it->second->getIP() != 0) {
        if (listIP.find(it->second->getIP()) != listIP.end()) {
             listIP[it->second->getIP()]++;
             if (listIP[it->second->getIP()] < 5) {
               real++;
             }
         } else {
           listIP[it->second->getIP()] = 1;
             real++;
         }
       }
}
sprintf(buffer, "%d", real);
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
Then remove MC limit without any worries.
 
Solution
I have
C++:
sprintf(buffer, "%d", Connection::connectionCount);
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
instead of
C++:
sprintf(buffer, "%d", g_game.getPlayersOnline());
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
can change without any worries, right?
 
Try it, If you got error then link me to your source and I will try getting it work for you.
The one I posted above is for 0.4 rev3777
 
I have
C++:
sprintf(buffer, "%d", Connection::connectionCount);
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
instead of
C++:
sprintf(buffer, "%d", g_game.getPlayersOnline());
xmlSetProp(p, (const xmlChar*)"online", (const xmlChar*)buffer);
can change without any worries, right?
Yes, either way you'll be removing those 2 lines anyways, so the number inserted to the format string doesn't matter since it won't even be used anyways.
 
aight, It compiled. Lets hope I don't get banned this time
thank ya'll guys, after 2 days or something if I don't get banned I'll come here and chose the best answer
 
Back
Top