From f10e3c0fb171301da436d0a7ba9e5ca667415107 Mon Sep 17 00:00:00 2001 From: Yunfan Li <56597220+liyunfan1223@users.noreply.github.com> Date: Thu, 13 Feb 2025 00:06:18 +0800 Subject: [PATCH] Add announcement on server initialization and character login (#963) Add announcement on server initialization and character login. For repack distribution and public server host, avoid unintentional violations of AGPLv3.0 license. --- src/Playerbots.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/src/Playerbots.cpp b/src/Playerbots.cpp index 97ee6dc7..95369dae 100644 --- a/src/Playerbots.cpp +++ b/src/Playerbots.cpp @@ -98,6 +98,17 @@ public: sPlayerbotsMgr->AddPlayerbotData(player, false); sRandomPlayerbotMgr->OnPlayerLogin(player); + // Before modifying the following messages, please make sure it does not violate the AGPLv3.0 license + // especially if you are distributing a repack or hosting a public server + // e.g. you can replace the URL with your own repository, + // but it should be publicly accessible and include all modifications you've made + if (sPlayerbotAIConfig->enabled) + { + ChatHandler(player->GetSession()).SendSysMessage( + "|cff00ff00Playerbots:|r This server runs with |cff00ccffmod-playerbots|r " + "|cffcccccchttps://github.com/liyunfan1223/mod-playerbots|r"); + } + if (sPlayerbotAIConfig->enabled || sPlayerbotAIConfig->randomBotAutologin) { std::string roundedTime = @@ -105,7 +116,8 @@ public: roundedTime = roundedTime.substr(0, roundedTime.find('.') + 2); ChatHandler(player->GetSession()).SendSysMessage( - "Playerbots: bot initialization at server startup takes about '" + roundedTime + "' minutes."); + "|cff00ff00Playerbots:|r bot initialization at server startup takes about '" + + roundedTime + "' minutes."); } } } @@ -244,8 +256,23 @@ public: void OnBeforeWorldInitialized() override { - uint32 oldMSTime = getMSTime(); + // Before modifying the following messages, please make sure it does not violate the AGPLv3.0 license + // especially if you are distributing a repack or hosting a public server + // e.g. you can replace the URL with your own repository, + // but it should be publicly accessible and include all modifications you've made + LOG_INFO("server.loading", "============================================================"); + LOG_INFO("server.loading", "|| ||"); + LOG_INFO("server.loading", "|| AzerothCore Playerbots Module ||"); + LOG_INFO("server.loading", "|| ||"); + LOG_INFO("server.loading", "============================================================"); + LOG_INFO("server.loading", "|| mod-playerbots is a community-driven open-source ||"); + LOG_INFO("server.loading", "|| project based on AzerothCore, licensed under AGPLv3.0 ||"); + LOG_INFO("server.loading", "============================================================"); + LOG_INFO("server.loading", "|| https://github.com/liyunfan1223/mod-playerbots ||"); + LOG_INFO("server.loading", "============================================================"); + uint32 oldMSTime = getMSTime(); + LOG_INFO("server.loading", " "); LOG_INFO("server.loading", "Load Playerbots Config...");