Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void WorldSession::HandleBugOpcode(WorldPacket & recv_data)
- {
- CHECK_INWORLD_RETURN
- uint32 suggestion, contentlen;
- std::string content;
- uint32 typelen;
- std::string type;
- recv_data >> suggestion >> contentlen >> content >> typelen >> type;
- if(suggestion == 0)
- LOG_DEBUG("WORLD: Received CMSG_BUG [Bug Report]");
- else
- LOG_DEBUG("WORLD: Received CMSG_BUG [Suggestion]");
- uint64 AccountId = GetAccountId(true);
- uint32 TimeStamp = uint32(UNIXTIME);
- uint32 ReportID = objmgr.GenerateReportID();
- std::stringstream ss;
- ss << "INSERT INTO playerbugreports VALUES('";
- ss << ReportID << "','";
- ss << AccountId << "','";
- ss << TimeStamp << "','";
- ss << suggestion << "','";
- ss << CharacterDatabase.EscapeString(type) << "','";
- ss << CharacterDatabase.EscapeString(content) << "')";
- CharacterDatabase.ExecuteNA(ss.str().c_str());
- }
Advertisement
Add Comment
Please, Sign In to add comment