Skip to content

Instantly share code, notes, and snippets.

@SymbolixDEV
Created May 16, 2013 18:00
Show Gist options
  • Save SymbolixDEV/5593696 to your computer and use it in GitHub Desktop.
Save SymbolixDEV/5593696 to your computer and use it in GitHub Desktop.
Hack anticheat ban announce by gm :
//by Dawnbringers
//Fixed error by Dawnbringers
#include "ScriptPCH.h"
#include "Chat.h"
/* Colors */
#define MSG_COLOR_WHITE "|cffffffff"
#define MSG_COLOR_LIGHTBLUE "|cffADD8E6"
class anticheatcommand : public CommandScript
{
public:
anticheatcommand() : CommandScript("Anticheat") { }
ChatCommand* GetCommands() const
{
static ChatCommand IngameCommandTable[] =
{
{ "anticheat", SEC_GAMEMASTER, true, &HandleAnticheatCommand, "", NULL },
{ NULL, 0, false, NULL, "", NULL }
};
return IngameCommandTable;
}
static bool HandleAnticheatCommand(ChatHandler * handler, const char * args)
{
if(!*args)
return false;
char message[1024];
if(handler->GetSession()->GetSecurity() >= SEC_GAMEMASTER)
{
snprintf(message, 1024, "[Anticheat][%s%s|r]: %s%s|r", MSG_COLOR_WHITE, handler->GetSession()->GetPlayer()->GetName().c_str(), MSG_COLOR_LIGHTBLUE, args);
sWorld->SendServerMessage(SERVER_MSG_STRING, message, NULL);
}
return true;
}
};
void AddSC_anticheat()
{
new anticheatcommand;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment