diff --git a/src/server/scripts/Commands/cs_ban.cpp b/src/server/scripts/Commands/cs_ban.cpp
index 1c0ffd4..1c152dd 100644
--- a/src/server/scripts/Commands/cs_ban.cpp
+++ b/src/server/scripts/Commands/cs_ban.cpp
@@ -221,15 +221,15 @@ class ban_commandscript : public CommandScript
else if (mode == BAN_IP)
announce = "The IP '";
else
- announce = "Account '";
+ announce = "Account "; //第一部是
announce += nameOrIP.c_str();
- announce += "' was banned for ";
+ announce += " was banned for ";
announce += durationStr;
- announce += " by the character '";
- announce += m_session->GetPlayerName();
- announce += "'. The reason is: ";
+ announce += " by the character ";
+ announce += handler->GetSession()->GetPlayerName();
+ announce += ". The reason is: ";
announce += reasonStr;
- HandleAnnounceCommand(announce.c_str());
+ sWorld->SendServerMessage(SERVER_MSG_STRING, announce.c_str());//这里进行世界公告
}
return true;
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp
index 2082db1..76f208f 100644
--- a/src/server/scripts/Commands/cs_misc.cpp
+++ b/src/server/scripts/Commands/cs_misc.cpp
@@ -932,12 +932,12 @@ class misc_commandscript : public CommandScript
if (sWorld->getBoolConfig(CONFIG_SHOW_KICK_IN_WORLD))
{
- announce = "The character '";
+ announce = "The character "; //这里是踢玩家下线进行世界公告的
announce += playerName.c_str();
- announce += "' was kicked by the character '";
- announce += m_session->GetPlayerName();
- announce += "'.";
- HandleAnnounceCommand(announce.c_str());
+ announce += " was kicked by the character ";
+ announce += handler->GetSession()->GetPlayerName();
+ announce += ".";
+ sWorld->SendServerMessage(SERVER_MSG_STRING, announce.c_str());//这里进行世界公告
}
return true;
@@ -1794,8 +1794,8 @@ class misc_commandscript : public CommandScript
if(!muteReason)
{
- PSendSysMessage("You must enter a reason of mute");
- SetSentErrorMessage(true);
+ handler->PSendSysMessage("You must enter a reason of mute");
+ handler->SetSentErrorMessage(true);
return false;
}
@@ -1843,15 +1843,15 @@ class misc_commandscript : public CommandScript
if (sWorld->getBoolConfig(CONFIG_SHOW_MUTE_IN_WORLD))
{
- announce = "The character '";
+ announce = "The character ";
announce += nameLink.c_str();
- announce += "' was muted for ";
+ announce += " was muted for ";
announce += notSpeakTime;
- announce += " minutes by the character '";
- announce += m_session->GetPlayerName();
- announce += "'. The reason is: ";
+ announce += " minutes by the character ";
+ announce += handler->GetSession()->GetPlayerName();
+ announce += ". The reason is: ";
announce += muteReasonStr.c_str();
- HandleAnnounceCommand(announce.c_str());
+ sWorld->SendServerMessage(SERVER_MSG_STRING, announce.c_str());
}