Jump to content

Improve Koray`s anti-fishbot


Recommended Posts

Hello everybody , i use the koray function , a simple system anti-fishbot  from here : 

Spoiler

 

 

This is the function , where i make a little change to ban the account. Somebody have any ideea to improve him ? i don`t know C++ ...

Spoiler

if (!ch->GetLastFishTime())
            ch->SetLastFishTime(ms);
        else {
            if (ch->GetFishHackCount() == 5) {
                ch->ResetFishHackCount();
                LogManager::instance().HackLog("FISHBOT", ch);
                std::auto_ptr<SQLMsg> msg(DBManager::instance().DirectQuery("UPDATE account.account SET status= 'BLOCK' WHERE id = %d", ch->GetDesc()->GetAccountTable().id));
                ch->GetDesc()->DelayedDisconnect(3);
            }
            else {
                if ((ms == ch->GetLastFishTime()) || (abs(ch->GetLastFishTime() - ms) < 70) || (abs(ms - ch->GetLastFishTime()) < 70))
                    ch->UpdateFishHackCount();
                else
                    ch->ResetFishHackCount();
            }
        }

        if (test_server)
            ch->ChatPacket(CHAT_TYPE_INFO, "/HACK-TEST/ Last: %d Now: %d HackCount: %d", ch->GetLastFishTime(), ms, ch->GetFishHackCount());

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.