Jump to content

charlie2025

Members
  • Posts

    171
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by charlie2025

  1. imho, those errors are caused becose at unload mangos, outdoorpvpmgr delete objects and creatures spawned by outdoorpvp, but some of them were already deleted, so can't be deleted again.. to 0.12 support.. git pull git://github.com/charlie2025/mangos.git outdoor-0.12
  2. I have fixed it finnaly now in http://github.com/charlie2025/mangos/commit/0212421127c1fcd52a530d1c2eb10dc20e1e58f1 . It compile fine, but I didn't tested ingame , but it should work.
  3. I have temporarily reverted 7035 - this part with SPELL_EFFECT_SUMMON_WILD , it compiles now, but it is not a solution, we will try with balrok find more proper solution
  4. Fix isn't needed now, Arrai done same changes in 7014
  5. Now should work diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 54a2ecb..fb6b186 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1392,6 +1392,10 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) std::string description = ""; recv_data >> spam_type; // unk 0x01 const, may be spam type (mail/chat) recv_data >> spammer_guid; // player guid + + std::string spammer_name; + objmgr.GetPlayerNameByGUID(spammer_guid, spammer_name); + switch(spam_type) { case 0: @@ -1399,6 +1403,8 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) recv_data >> unk1; // const 0 recv_data >> unk2; // probably mail id recv_data >> unk3; // const 0 + sLog.outSpam("Mail: ID %u (Owner %u), Reporter : %s", unk2 , GUID_LOPART(spammer_guid), GetPlayer()->GetName()); + break; case 1: CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4+4+4+4+1); @@ -1407,6 +1413,7 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) recv_data >> unk3; // probably channel id recv_data >> unk4; // unk random value recv_data >> description; // spam description string (messagetype, channel name, player name, message) + sLog.outSpam("Chat: Player %s (%u), Reporter: %s, Data: %s ", spammer_name.c_str(), GUID_LOPART(spammer_guid), GetPlayer()->GetName(), description.c_str()); break; } @@ -1418,8 +1425,8 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) data << uint8(0); SendPacket(&data); - sLog.outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str()); -} + + } void WorldSession::HandleRealmStateRequestOpcode( WorldPacket & recv_data ) { diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index c63ef9d..3b99b16 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -251,6 +251,10 @@ AddonChannel = 1 # Default: 0 - don't include dumping chars to log # 1 - include dumping chars to log # +# SpamLogFile +# Spam Log file for logging player reported spams +# Default: "" (disabled) +# # GmLogFile # GM Log file of gm commands # Default: "" (Disable) @@ -296,6 +300,7 @@ DBErrorLogFile = "DBErrors.log" CharLogFile = "Char.log" CharLogTimestamp = 0 CharLogDump = 0 +SpamlogFile = "spam.log" GmLogFile = "" GmLogTimestamp = 0 GmLogPerAccount = 0 diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index f5d0513..465a43d 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -37,7 +37,7 @@ enum LogType const int LogType_count = int(LogError) +1; Log::Log() : - raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), + raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), spamlog(NULL), dberLogfile(NULL), m_colored(false), m_includeTime(false), m_gmlog_per_account(false) { Initialize(); @@ -228,6 +228,7 @@ void Log::Initialize() dberLogfile = openLogFile("DBErrorLogFile",NULL,"a"); raLogfile = openLogFile("RaLogFile",NULL,"a"); + spamlog = openLogFile("SpamlogFile", NULL, "a"); // Main log file settings m_includeTime = sConfig.GetBoolDefault("LogTime", false); @@ -725,6 +726,38 @@ void Log::outRALog( const char * str, ... ) fflush(stdout); } +void Log::outSpam( const char * msg, ... ) +{ + if( !msg ) return; + + if(m_colored) + SetColor(false,m_colors[LogError]); + + if(m_includeTime) + outTime(); + + va_list ap; + va_start(ap, msg); + vfprintf( stderr, msg, ap ); + va_end(ap); + + if(m_colored) + ResetColor(false); + + fprintf( stderr, "\\n" ); + if(spamlog) + { + outTimestamp(spamlog); + fprintf(spamlog, "Reported spam: "); + va_start(ap, msg); + vfprintf(spamlog, msg, ap); + fprintf(spamlog, "\\n" ); + va_end(ap); + fflush(spamlog); + } + fflush(stderr); +} + void outstring_log(const char * str, ...) { if( !str ) diff --git a/src/shared/Log.h b/src/shared/Log.h index 391a93d..68f4fc4 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -79,6 +79,11 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea if (raLogfile != NULL) fclose(raLogfile); raLogfile = NULL; + + if (spamlog != NULL) + fclose(spamlog); + raLogfile = NULL; + } public: void Initialize(); @@ -107,6 +112,8 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea // any log level void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name ); void outRALog( const char * str, ... ) ATTR_PRINTF(2,3); + void outSpam( const char * msg, ... ) ATTR_PRINTF(2,3); + void SetLogLevel(char * Level); void SetLogFileLevel(char * Level); void SetColor(bool stdout_stream, Color color); @@ -123,6 +130,7 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea FILE* openGmlogPerAccount(uint32 account); FILE* raLogfile; + FILE* spamlog; FILE* logfile; FILE* gmLogfile; FILE* charLogfile;
  6. Hmm, I had biggest spam from UpdateAchievementCriteria, but yes, other should be set too. http://github.com/charlie2025/mangos/commit/c80d2094f0007092e371a923d288e814de216f33 Set also other output in achievements to detail
  7. What bug does the patch fix? What features does the patch add? In function UpdateAchievementCriteria() there is one output - sLog.outString , This spam console a lot, from one player there are few more lines in console at basic loglevel set. So changed this log as detail. For which SubVersion revision was the patch created? master - 0d2b8e0190654f38e8816343fbba5b5839a4d4b0 Who has been writing this patch? Please include either forum user names or email addresses. Charlie2025 git pull git://github.com/charlie2025/mangos.git achiev_log ( http://github.com/charlie2025/mangos/commit/61d72051da5de9618d5e325f044b3ed22665a56c )
  8. Yes, I got the same if pull, clone etc.. Reported to github, hope they fix it soon. EDIT: WORKING now
  9. Oh, again merged with master, but do you use some other patches ? Merging in my case was without problem.
  10. Nice patches from you, thank you.
  11. Only first and "Loading Pet Create Spells"... is mangos related I would say. Others will be "not updated database contect for new patch"
  12. Probably you need to have wotlk to acces new maps, create death knight character etc.
  13. I would be pleased if someone can test it on 3.0.3, I currently don't have chance to test it, I have updated branch, there was some rejects, I fixed them, but test it somebody.. Thanks
  14. Nice christmas present, but one question, soon will be 3.0.8 patch, what about it ? Would be better to head to 3.0.8 ?
  15. Maybe should be Accepted/Rejected if original arena patch is in GIT
  16. * Clent start, find in realmlist.wtf address of realm server and connect, if port not selected, default is 3724. * AUTH_LOGON_CHALLENGE (username, version of client, ip address etc.) * Server check IP address, check if account isn't banned and send informations, needed for authentication by protocol SRP6 * AUTH_LOGIN_CHALLENGE * Client does calculations SRP6 login protocol and send * AUTH_LOGON_PROOF * Server does calculations SRP6 and if accord, data is saved to database - `sessionkey` in account table and send. * AUTH_LOGON_PROOF (success) * After success login to realm server, client asks for list of world servers. * REALM_LIST * Server makes list of world servers and send them to client. * REALM_LIST * User selects his realm (or last visited is used) and client dissconect from realm server, create connection to world server. * Server accept the connection and sending data as first. * SMSG_AUTH_CHALLENGE * Packet contains server_seed,on his base is from sessionkey created hash and send to server. * CMSG_AUTH_SESSION * Server does rest control calculations and compare them with client's, if all is OK, SMSG_AUTH_RESPONSE is send and initialize encryption of packet headers. * SMSG_AUTH_RESPONSE * Client create a encryption and send. * CMSG_CHAR_ENUM * Server makes a list of character list for logged account and send. * CMSG_CHAR_ENUM * Player select a character and login to game, packet with player guid is send. * CMSG_PLAYER_LOGIN.... This is little bit simply, if you want narrowly information, visit realmd & mangos sources..
  17. The empty space in mail report spam is caused by different filling of variables if mail/chat spam, I do something with it. Here is new patch diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 8812701..1bf7e14 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1310,6 +1310,10 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) std::string description = ""; recv_data >> spam_type; // unk 0x01 const, may be spam type (mail/chat) recv_data >> spammer_guid; // player guid + + std::string spammer_name; + objmgr.GetPlayerNameByGUID(spammer_guid, spammer_name); + switch(spam_type) { case 0: @@ -1317,7 +1321,9 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) recv_data >> unk1; // const 0 recv_data >> unk2; // probably mail id recv_data >> unk3; // const 0 - break; + sLog.outSpam("Mail: ID %u (Owner %u), Reporter : %s", unk2 , spammer_guid, GetPlayerName()); + + break; case 1: CHECK_PACKET_SIZE(recv_data, recv_data.rpos()+4+4+4+4+1); recv_data >> unk1; // probably language @@ -1325,7 +1331,8 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) recv_data >> unk3; // probably channel id recv_data >> unk4; // unk random value recv_data >> description; // spam description string (messagetype, channel name, player name, message) - break; + sLog.outSpam("Chat: Player %s (%u), Reporter: %s, Data: %s ", spammer_name.c_str(), spammer_guid, GetPlayerName(), description.c_str()); + break; } // NOTE: all chat messages from this spammer automatically ignored by spam reporter until logout in case chat spam. @@ -1335,8 +1342,7 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) WorldPacket data(SMSG_COMPLAIN_RESULT, 1); data << uint8(0); SendPacket(&data); - - sLog.outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str()); + } void WorldSession::HandleRealmStateRequestOpcode( WorldPacket & recv_data ) diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 2c6ca91..c708457 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -251,6 +251,10 @@ AddonChannel = 1 # Default: 0 - don't include dumping chars to log # 1 - include dumping chars to log # +# SpamLogFile +# Spam Log file for logging player reported spams +# Default: "" (disabled) +# # GmLogFile # GM Log file of gm commands # Default: "" (Disable) @@ -296,6 +300,7 @@ DBErrorLogFile = "DBErrors.log" CharLogFile = "Char.log" CharLogTimestamp = 0 CharLogDump = 0 +SpamlogFile = "spam.log" GmLogFile = "" GmLogTimestamp = 0 GmLogPerAccount = 0 diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index f5d0513..2c1e9f3 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -37,7 +37,7 @@ enum LogType const int LogType_count = int(LogError) +1; Log::Log() : - raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), + raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), spamlog(NULL), dberLogfile(NULL), m_colored(false), m_includeTime(false), m_gmlog_per_account(false) { Initialize(); @@ -228,6 +228,7 @@ void Log::Initialize() dberLogfile = openLogFile("DBErrorLogFile",NULL,"a"); raLogfile = openLogFile("RaLogFile",NULL,"a"); + spamlog = openLogFile("SpamlogFile", NULL, "a"); // Main log file settings m_includeTime = sConfig.GetBoolDefault("LogTime", false); @@ -725,6 +726,38 @@ void Log::outRALog( const char * str, ... ) fflush(stdout); } +void Log::outSpam( const char * msg, ... ) +{ + if( !msg ) return; + + if(m_colored) + SetColor(false,m_colors[LogError]); + + if(m_includeTime) + outTime(); + + va_list ap; + va_start(ap, msg); + vfprintf( stderr, msg, ap ); + va_end(ap); + + if(m_colored) + ResetColor(false); + + fprintf( stderr, "\\n" ); + if(spamlog) + { + outTimestamp(spamlog); + fprintf(spamlog, "Reported spam: "); + va_start(ap, msg); + vfprintf(spamlog, msg, ap); + fprintf(spamlog, "\\n" ); + va_end(ap); + fflush(spamlog); + } + fflush(stderr); +} + void outstring_log(const char * str, ...) { if( !str ) diff --git a/src/shared/Log.h b/src/shared/Log.h index 391a93d..bc071e2 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -79,6 +79,11 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea if (raLogfile != NULL) fclose(raLogfile); raLogfile = NULL; + + if (spamlog != NULL) + fclose(spamlog); + raLogfile = NULL; + } public: void Initialize(); @@ -107,6 +112,8 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea // any log level void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name ); void outRALog( const char * str, ... ) ATTR_PRINTF(2,3); + void outSpam( const char * msg, ... ) ATTR_PRINTF(2,3); + void SetLogLevel(char * Level); void SetLogFileLevel(char * Level); void SetColor(bool stdout_stream, Color color); @@ -123,6 +130,7 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea FILE* openGmlogPerAccount(uint32 account); FILE* raLogfile; + FILE* spamlog; FILE* logfile; FILE* gmLogfile; FILE* charLogfile;
  18. I wrote small patch for it, maybe you could test it and give report and then maybe post to review diff --git a/src/game/MiscHandler.cpp b/src/game/MiscHandler.cpp index 8812701..ca3da21 100644 --- a/src/game/MiscHandler.cpp +++ b/src/game/MiscHandler.cpp @@ -1336,7 +1336,10 @@ void WorldSession::HandleReportSpamOpcode( WorldPacket & recv_data ) data << uint8(0); SendPacket(&data); - sLog.outDebug("REPORT SPAM: type %u, guid %u, unk1 %u, unk2 %u, unk3 %u, unk4 %u, message %s", spam_type, GUID_LOPART(spammer_guid), unk1, unk2, unk3, unk4, description.c_str()); + std::string spamer_name; + objmgr.GetPlayerNameByGUID(spammer_guid, spamer_name); + + sLog.outSpam("Spamer: %s (Guid %u) , Message : %s , Reporter : %s", spamer_name.c_str() ,GUID_LOPART(spammer_guid) , description.c_str(), GetPlayerName()); } void WorldSession::HandleRealmStateRequestOpcode( WorldPacket & recv_data ) diff --git a/src/mangosd/mangosd.conf.dist.in b/src/mangosd/mangosd.conf.dist.in index 2c6ca91..c708457 100644 --- a/src/mangosd/mangosd.conf.dist.in +++ b/src/mangosd/mangosd.conf.dist.in @@ -251,6 +251,10 @@ AddonChannel = 1 # Default: 0 - don't include dumping chars to log # 1 - include dumping chars to log # +# SpamLogFile +# Spam Log file for logging player reported spams +# Default: "" (disabled) +# # GmLogFile # GM Log file of gm commands # Default: "" (Disable) @@ -296,6 +300,7 @@ DBErrorLogFile = "DBErrors.log" CharLogFile = "Char.log" CharLogTimestamp = 0 CharLogDump = 0 +SpamlogFile = "spam.log" GmLogFile = "" GmLogTimestamp = 0 GmLogPerAccount = 0 diff --git a/src/shared/Log.cpp b/src/shared/Log.cpp index f5d0513..45c0e1a 100644 --- a/src/shared/Log.cpp +++ b/src/shared/Log.cpp @@ -37,7 +37,7 @@ enum LogType const int LogType_count = int(LogError) +1; Log::Log() : - raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), + raLogfile(NULL), logfile(NULL), gmLogfile(NULL), charLogfile(NULL), spamlog(NULL), dberLogfile(NULL), m_colored(false), m_includeTime(false), m_gmlog_per_account(false) { Initialize(); @@ -228,6 +228,7 @@ void Log::Initialize() dberLogfile = openLogFile("DBErrorLogFile",NULL,"a"); raLogfile = openLogFile("RaLogFile",NULL,"a"); + spamlog = openLogFile("SpamlogFile", NULL, "a"); // Main log file settings m_includeTime = sConfig.GetBoolDefault("LogTime", false); @@ -725,6 +726,38 @@ void Log::outRALog( const char * str, ... ) fflush(stdout); } +void Log::outSpam( const char * msg, ... ) +{ + if( !msg ) return; + + if(m_colored) + SetColor(false,m_colors[LogError]); + + if(m_includeTime) + outTime(); + + va_list ap; + va_start(ap, msg); + vfprintf( stderr, msg, ap ); + va_end(ap); + + if(m_colored) + ResetColor(false); + + fprintf( stderr, "\\n" ); + if(spamlog) + { + outTimestamp(spamlog); + fprintf(spamlog, "Reported spam:" ); + va_start(ap, msg); + vfprintf(spamlog, msg, ap); + fprintf(spamlog, "\\n" ); + va_end(ap); + fflush(spamlog); + } + fflush(stderr); +} + void outstring_log(const char * str, ...) { if( !str ) diff --git a/src/shared/Log.h b/src/shared/Log.h index 391a93d..bc071e2 100644 --- a/src/shared/Log.h +++ b/src/shared/Log.h @@ -79,6 +79,11 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea if (raLogfile != NULL) fclose(raLogfile); raLogfile = NULL; + + if (spamlog != NULL) + fclose(spamlog); + raLogfile = NULL; + } public: void Initialize(); @@ -107,6 +112,8 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea // any log level void outCharDump( const char * str, uint32 account_id, uint32 guid, const char * name ); void outRALog( const char * str, ... ) ATTR_PRINTF(2,3); + void outSpam( const char * msg, ... ) ATTR_PRINTF(2,3); + void SetLogLevel(char * Level); void SetLogFileLevel(char * Level); void SetColor(bool stdout_stream, Color color); @@ -123,6 +130,7 @@ class Log : public MaNGOS::Singleton<Log, MaNGOS::ClassLevelLockable<Log, ZThrea FILE* openGmlogPerAccount(uint32 account); FILE* raLogfile; + FILE* spamlog; FILE* logfile; FILE* gmLogfile; FILE* charLogfile; git apply < patch.diff
  19. Yes, I got the same with outdoor pvp patch.. can anyone confirm it with clean mangos ?
  20. Hmm, I don't see any advantage on it, if ScriptDev2 would be still on SVN and you would only copy it - dividing of community, one person write patch for git.. one for svn..
  21. %u is unsigned int = uint32 %s = string and so on..
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use