void AnticheatMgr::Report(Player* player, uint8 hackType)
{
	uint32 _times;
	_times = player->GetGUID();

	player->m_Events.AddEvent(new ClearTimes(), player->m_Events.CalculateTime(10000));
	reportTimes[_times].Times++;

	switch(reportTimes[_times].Times)
	{
	case 2:
		Alerts(player, 0, hackType);
		break;
	case 3:
		Alerts(player, 0, hackType);
		break;
	case 4:
		Alerts(player, 1, hackType);
		break;
	case 5:
		reportTimes.clear();
		Alerts(player, 2, hackType);
		player->GetSession()->KickPlayer(); // Here you can change the punishment you want.
		break;
	}
}
示例#2
0
void prog8051::ProgramClicked(void)
{
    if(HexFile->text() == "")
    {
        BrowseClicked();
        if(HexFile->text() == "")
        {
            QMessageBox::information(this,"ERROR","ERROR: I need a filename to proceed.");
            return;
        }
    }

    progthread = new progThread;
    connect(progthread,SIGNAL(Status(int)),this,SLOT(SetStatus(int)));
    connect(progthread,SIGNAL(Error(QString)),this,SLOT(Alerts(QString)));
    connect(progthread,SIGNAL(finished()),this,SLOT(ThreadFinished()));
    connect(progthread,SIGNAL(Info(QString)),this,SLOT(SetInst(QString)));

    progthread->Init(HexFile->text(),SerialPort->currentText(),Baudrate->currentText().toInt());
    progthread->start();
    ButtonsToggle(false);
}