summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-12-11 19:10:19 +0300
committerAndrei Karas <akaras@inbox.ru>2017-12-11 19:10:19 +0300
commitee1fc0b63cb7f27df85c43474497b805df6e31f5 (patch)
treed233f17e1bfd751b6939646a24f1253ae8d14796
parenta80f4ac5c1c3ef4d3ac5f026591b16074d0bf451 (diff)
downloadmv-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.gz
mv-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.bz2
mv-ee1fc0b63cb7f27df85c43474497b805df6e31f5.tar.xz
mv-ee1fc0b63cb7f27df85c43474497b805df6e31f5.zip
Remove default parameters from ChatTab::chatLog.
-rw-r--r--src/actormanager.cpp36
-rw-r--r--src/being/being.cpp8
-rw-r--r--src/being/localplayer.cpp17
-rw-r--r--src/game.cpp40
-rw-r--r--src/gui/widgets/tabs/chat/chattab.cpp8
-rw-r--r--src/gui/widgets/tabs/chat/chattab.h12
-rw-r--r--src/gui/widgets/tabs/socialguildtab.h8
-rw-r--r--src/gui/widgets/tabs/socialpartytab.h8
-rw-r--r--src/gui/windows/chatwindow.cpp56
-rw-r--r--src/gui/windows/socialwindow.cpp38
-rw-r--r--src/gui/windows/tradewindow.cpp12
-rw-r--r--src/net/eathena/chatrecv.cpp15
-rw-r--r--src/net/eathena/guildrecv.cpp63
-rw-r--r--src/net/tmwa/chatrecv.cpp15
-rw-r--r--src/net/tmwa/guildmanager.cpp10
-rw-r--r--src/notifymanager.cpp32
-rw-r--r--src/progs/manaplus/actions/actions.cpp120
-rw-r--r--src/progs/manaplus/actions/chat.cpp49
-rw-r--r--src/progs/manaplus/actions/commands.cpp87
-rw-r--r--src/progs/manaplus/actions/statusbar.cpp8
-rw-r--r--src/resources/memorymanager.cpp4
-rw-r--r--src/statuseffect.cpp10
22 files changed, 502 insertions, 154 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp
index c4079f776..4c9b1460c 100644
--- a/src/actormanager.cpp
+++ b/src/actormanager.cpp
@@ -1596,8 +1596,13 @@ void ActorManager::printBeingsToChat(const std::string &header) const
return;
debugChatTab->chatLog("---------------------------------------",
- ChatMsgType::BY_SERVER);
- debugChatTab->chatLog(header, ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ debugChatTab->chatLog(header,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
for_actors
{
// disabled for performance
@@ -1611,7 +1616,10 @@ void ActorManager::printBeingsToChat(const std::string &header) const
debugChatTab->chatLog(strprintf("%s (%d,%d) %d",
being->getName().c_str(), being->getTileX(), being->getTileY(),
- toInt(being->getSubType(), int)), ChatMsgType::BY_SERVER);
+ toInt(being->getSubType(), int)),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
if (mActorsIdMap.find(being->getId()) == mActorsIdMap.end())
{
debugChatTab->chatLog("missing in id map: %s",
@@ -1619,7 +1627,9 @@ void ActorManager::printBeingsToChat(const std::string &header) const
}
}
debugChatTab->chatLog("---------------------------------------",
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
FOR_EACH (ActorSpritesMapConstIterator, itr, mActorsIdMap)
{
const ActorSprite *const actor = (*itr).second;
@@ -1654,8 +1664,13 @@ void ActorManager::printBeingsToChat(const STD_VECTOR<Being*> &beings,
return;
debugChatTab->chatLog("---------------------------------------",
- ChatMsgType::BY_SERVER);
- debugChatTab->chatLog(header, ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ debugChatTab->chatLog(header,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
FOR_EACH (STD_VECTOR<Being*>::const_iterator, i, beings)
{
@@ -1666,10 +1681,15 @@ void ActorManager::printBeingsToChat(const STD_VECTOR<Being*> &beings,
debugChatTab->chatLog(strprintf("%s (%d,%d) %d",
being->getName().c_str(), being->getTileX(), being->getTileY(),
- toInt(being->getSubType(), int)), ChatMsgType::BY_SERVER);
+ toInt(being->getSubType(), int)),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
debugChatTab->chatLog("---------------------------------------",
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
void ActorManager::getPlayerNames(StringVect &names,
diff --git a/src/being/being.cpp b/src/being/being.cpp
index 429201cf2..618989bd5 100644
--- a/src/being/being.cpp
+++ b/src/being/being.cpp
@@ -751,7 +751,9 @@ void Being::takeDamage(Being *restrict const attacker,
{
ChatWindow::battleChatLog(strprintf("%s : Hit you -%d",
attacker->getName().c_str(), amount),
- ChatMsgType::BY_OTHER);
+ ChatMsgType::BY_OTHER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else if (attacker == localPlayer && (amount != 0))
@@ -760,7 +762,9 @@ void Being::takeDamage(Being *restrict const attacker,
attacker->mName.c_str(),
mName.c_str(),
amount),
- ChatMsgType::BY_PLAYER);
+ ChatMsgType::BY_PLAYER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
if (font != nullptr && particleEngine != nullptr)
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 94fa39a1f..3eb2a32af 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -924,8 +924,14 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo,
msg = N_("Unknown problem picking up item.");
break;
}
- if ((localChatTab != nullptr) && config.getBoolValue("showpickupchat"))
- localChatTab->chatLog(gettext(msg), ChatMsgType::BY_SERVER);
+ if (localChatTab != nullptr &&
+ config.getBoolValue("showpickupchat"))
+ {
+ localChatTab->chatLog(gettext(msg),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
if ((mMap != nullptr) && config.getBoolValue("showpickupparticle"))
{
@@ -954,7 +960,9 @@ void LocalPlayer::pickedUp(const ItemInfo &itemInfo,
localChatTab->chatLog(strprintf(ngettext("You picked up %d "
"[@@%d|%s@@].", "You picked up %d [@@%d|%s@@].", amount),
amount, itemInfo.getId(), str.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
if ((mMap != nullptr) && config.getBoolValue("showpickupparticle"))
@@ -2038,7 +2046,8 @@ void LocalPlayer::afkRespond(ChatTab *const tab, const std::string &nick)
localChatTab->chatLog(std::string(mName).append(
" : ").append(msg),
ChatMsgType::ACT_WHISPER,
- IgnoreRecord_false);
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
diff --git a/src/game.cpp b/src/game.cpp
index e09e6c92f..488651f15 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -296,7 +296,12 @@ static void createGuiWindows()
{
const StringVect &messages = assertListener->getMessages();
FOR_EACH (StringVectCIter, it, messages)
- debugChatTab->chatLog(*it, ChatMsgType::BY_SERVER);
+ {
+ debugChatTab->chatLog(*it,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
delete2(assertListener);
}
if (config.getBoolValue("enableTradeTab"))
@@ -621,7 +626,10 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot,
// TRANSLATORS: save file message
std::string str = strprintf(_("Screenshot saved as %s"),
fileNameStr.c_str());
- localChatTab->chatLog(str, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(str,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -630,7 +638,9 @@ bool Game::saveScreenshot(SDL_Surface *const screenshot,
{
// TRANSLATORS: save file message
localChatTab->chatLog(_("Saving screenshot failed!"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
logger->log1("Error: could not save screenshot.");
}
@@ -807,8 +817,12 @@ void Game::adjustPerfomance()
config.setSilent("beingopacity", true);
if (localChatTab != nullptr)
{
- localChatTab->chatLog("Auto disable Show "
- "beings transparency", ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(
+ // TRANSLATORS: auto adjust settings message
+ _("Auto disable Show beings transparency"),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -824,8 +838,12 @@ void Game::adjustPerfomance()
ParticleEngine::emitterSkip = 4;
if (localChatTab != nullptr)
{
- localChatTab->chatLog("Auto lower Particle "
- "effects", ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(
+ // TRANSLATORS: auto adjust settings message
+ _("Auto lower Particle effects"),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -841,8 +859,12 @@ void Game::adjustPerfomance()
config.setSilent("alphaCache", false);
if (localChatTab != nullptr)
{
- localChatTab->chatLog("Auto enable opacity cache",
- ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(
+ // TRANSLATORS: auto adjust settings message
+ _("Auto enable opacity cache"),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
break;
diff --git a/src/gui/widgets/tabs/chat/chattab.cpp b/src/gui/widgets/tabs/chat/chattab.cpp
index e4f6d751a..3fc6fb252 100644
--- a/src/gui/widgets/tabs/chat/chattab.cpp
+++ b/src/gui/widgets/tabs/chat/chattab.cpp
@@ -552,12 +552,16 @@ void ChatTab::showOnline(const std::string &nick,
{
// TRANSLATORS: chat message
chatLog(strprintf(_("%s is now Online."), nick.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
// TRANSLATORS: chat message
chatLog(strprintf(_("%s is now Offline."), nick.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
diff --git a/src/gui/widgets/tabs/chat/chattab.h b/src/gui/widgets/tabs/chat/chattab.h
index 440501af4..6e51ca172 100644
--- a/src/gui/widgets/tabs/chat/chattab.h
+++ b/src/gui/widgets/tabs/chat/chattab.h
@@ -40,7 +40,12 @@ class ScrollArea;
#define debugMsg(str) \
if (debugChatTab) \
- debugChatTab->chatLog(str, ChatMsgType::BY_SERVER);
+ { \
+ debugChatTab->chatLog(str, \
+ ChatMsgType::BY_SERVER, \
+ IgnoreRecord_false, \
+ TryRemoveColors_true); \
+ }
#define setTabColors(name) \
setTabColor(&getThemeColor(name), \
@@ -79,9 +84,8 @@ class ChatTab notfinal : public Tab
*/
void chatLog(std::string line,
ChatMsgTypeT own,
- const IgnoreRecord ignoreRecord = IgnoreRecord_false,
- const TryRemoveColors tryRemoveColors
- = TryRemoveColors_true);
+ const IgnoreRecord ignoreRecord,
+ const TryRemoveColors tryRemoveColors);
/**
* Adds the text to the message list
diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h
index 8652a54fe..b2ea74d10 100644
--- a/src/gui/widgets/tabs/socialguildtab.h
+++ b/src/gui/widgets/tabs/socialguildtab.h
@@ -86,7 +86,9 @@ class SocialGuildTab final : public SocialTab,
_("Invited user %s to guild %s."),
name.c_str(),
mGuild->getName().c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
mInviteDialog = nullptr;
}
@@ -103,7 +105,9 @@ class SocialGuildTab final : public SocialTab,
// TRANSLATORS: chat message
_("Guild %s quit requested."),
mGuild->getName().c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
mConfirmDialog = nullptr;
}
diff --git a/src/gui/widgets/tabs/socialpartytab.h b/src/gui/widgets/tabs/socialpartytab.h
index d7f22c1f7..d3ed6d9d8 100644
--- a/src/gui/widgets/tabs/socialpartytab.h
+++ b/src/gui/widgets/tabs/socialpartytab.h
@@ -87,7 +87,9 @@ class SocialPartyTab final : public SocialTab,
// TRANSLATORS: chat message
_("Invited user %s to party."),
name.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
mInviteDialog = nullptr;
}
@@ -104,7 +106,9 @@ class SocialPartyTab final : public SocialTab,
// TRANSLATORS: tab in social window
_("Party %s quit requested."),
mParty->getName().c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
mConfirmDialog = nullptr;
}
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index aa899202d..2afbe7caf 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -716,7 +716,10 @@ void ChatWindow::doPresent() const
// TRANSLATORS: chat message
_("Present: %s; %d players are present."),
response.c_str(), playercount);
- tab->chatLog(log, ChatMsgType::BY_SERVER);
+ tab->chatLog(log,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
@@ -1018,7 +1021,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
{
battleChatLog(std::string("+").append(toString(
CAST_U64(change))).append(" xp"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
break;
}
@@ -1026,7 +1031,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
battleChatLog(std::string(
"Level: ").append(toString(CAST_S32(
newVal))),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
case Attributes::PLAYER_JOB_EXP:
{
@@ -1043,7 +1050,9 @@ void ChatWindow::attributeChanged(const AttributesT id,
{
battleChatLog(std::string("+").append(toString(CAST_U64(
change))).append(" job"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
break;
}
@@ -1126,7 +1135,10 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
}
else if (own == ChatMsgType::BY_SERVER)
{
- tab->chatLog(mes, ChatMsgType::BY_SERVER);
+ tab->chatLog(mes,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
@@ -1149,7 +1161,10 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
{
if (config.getBoolValue("removeColors"))
msg = removeColors(msg);
- tab->chatLog(msg, ChatMsgType::BY_SERVER);
+ tab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -1168,14 +1183,17 @@ void ChatWindow::addWhisper(const std::string &restrict nick,
// TRANSLATORS: chat message
localChatTab->chatLog(strprintf(_("Whispering to %s: %s"),
nick.c_str(), mes.c_str()),
- ChatMsgType::BY_PLAYER);
+ ChatMsgType::BY_PLAYER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
localChatTab->chatLog(std::string(nick).append(
" : ").append(mes),
ChatMsgType::ACT_WHISPER,
- IgnoreRecord_false);
+ IgnoreRecord_false,
+ TryRemoveColors_true);
if (localPlayer != nullptr)
localPlayer->afkRespond(nullptr, nick);
}
@@ -1694,7 +1712,10 @@ bool ChatWindow::resortChatLog(std::string line,
{
if (langChatTab->getChannelName() == channel)
{
- langChatTab->chatLog(line, own, ignoreRecord, tryRemoveColors);
+ langChatTab->chatLog(line,
+ own,
+ ignoreRecord,
+ tryRemoveColors);
}
else if (mShowAllLang)
{
@@ -2118,11 +2139,17 @@ void ChatWindow::addGlobalMessage(const std::string &line)
if (debugChatTab != nullptr &&
findI(line, mGlobalsFilter) != std::string::npos)
{
- debugChatTab->chatLog(line, ChatMsgType::BY_OTHER);
+ debugChatTab->chatLog(line,
+ ChatMsgType::BY_OTHER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
- localChatTab->chatLog(line, ChatMsgType::BY_GM);
+ localChatTab->chatLog(line,
+ ChatMsgType::BY_GM,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
@@ -2134,7 +2161,12 @@ bool ChatWindow::isTabPresent(const ChatTab *const tab) const
void ChatWindow::debugMessage(const std::string &msg)
{
if (debugChatTab != nullptr)
- debugChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ debugChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
}
void ChatWindow::showGMTab()
diff --git a/src/gui/windows/socialwindow.cpp b/src/gui/windows/socialwindow.cpp
index 174762100..cbdf1d68d 100644
--- a/src/gui/windows/socialwindow.cpp
+++ b/src/gui/windows/socialwindow.cpp
@@ -276,7 +276,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Accepted party invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
partyHandler->inviteResponse(mPartyId, true);
}
@@ -288,7 +290,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Rejected party invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
partyHandler->inviteResponse(mPartyId, false);
}
@@ -306,7 +310,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Accepted guild invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
#ifdef TMWA_SUPPORT
if (guildManager == nullptr || !GuildManager::getEnableGuildBot())
@@ -326,7 +332,9 @@ void SocialWindow::action(const ActionEvent &event)
// TRANSLATORS: chat message
strprintf(_("Rejected guild invite from %s."),
mPartyInviter.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
#ifdef TMWA_SUPPORT
if (guildManager == nullptr || !GuildManager::getEnableGuildBot())
@@ -384,7 +392,9 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName,
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received guild request, but one already "
"exists."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return;
}
@@ -395,7 +405,12 @@ void SocialWindow::showGuildInvite(const std::string &restrict guildName,
inviterName.c_str(), guildName.c_str());
if (localChatTab != nullptr)
- localChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ localChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
CREATEWIDGETV(mGuildAcceptDialog, ConfirmDialog,
// TRANSLATORS: guild invite message
@@ -421,7 +436,9 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
// TRANSLATORS: chat message
localChatTab->chatLog(_("Received party request, but one already "
"exists."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return;
}
@@ -458,7 +475,12 @@ void SocialWindow::showPartyInvite(const std::string &restrict partyName,
}
if (localChatTab != nullptr)
- localChatTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ {
+ localChatTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
// show invite
CREATEWIDGETV(mPartyAcceptDialog, ConfirmDialog,
diff --git a/src/gui/windows/tradewindow.cpp b/src/gui/windows/tradewindow.cpp
index 66f4e0550..bd8ba020f 100644
--- a/src/gui/windows/tradewindow.cpp
+++ b/src/gui/windows/tradewindow.cpp
@@ -438,7 +438,9 @@ void TradeWindow::action(const ActionEvent &event)
{
// TRANSLATORS: trade error
localChatTab->chatLog(_("You don't have enough money."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
v = curMoney;
}
@@ -528,7 +530,9 @@ bool TradeWindow::checkItem(const Item *const item) const
// TRANSLATORS: trade error
localChatTab->chatLog(_("Failed adding item. You can not "
"overlap one kind of item on the window."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return false;
}
@@ -540,7 +544,9 @@ bool TradeWindow::checkItem(const Item *const item) const
localChatTab->chatLog(
// TRANSLATORS: trade error
_("Failed adding item. You can not trade equipped items."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return false;
}
diff --git a/src/net/eathena/chatrecv.cpp b/src/net/eathena/chatrecv.cpp
index 97f0de803..2748d76d7 100644
--- a/src/net/eathena/chatrecv.cpp
+++ b/src/net/eathena/chatrecv.cpp
@@ -498,7 +498,10 @@ void ChatRecv::processWhisperContinue(const std::string &nick,
}
else if (localChatTab != nullptr)
{
- localChatTab->chatLog(chatMsg, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(chatMsg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
BLOCK_END("ChatRecv::processWhisper")
}
@@ -745,7 +748,10 @@ void ChatRecv::processChatTalkieBox(Net::MessageIn &msg)
{
msg.readBeingId("being id");
const std::string message = msg.readString(80, "message");
- localChatTab->chatLog(message, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(message,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
void ChatRecv::processBattleChatMessage(Net::MessageIn &msg)
@@ -762,7 +768,10 @@ void ChatRecv::processScriptMessage(Net::MessageIn &msg)
const int sz = msg.readInt16("len") - 8;
msg.readBeingId("being id");
const std::string message = msg.readString(sz, "message");
- localChatTab->chatLog(message, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(message,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
} // namespace EAthena
diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp
index fd7570896..c0be1be01 100644
--- a/src/net/eathena/guildrecv.cpp
+++ b/src/net/eathena/guildrecv.cpp
@@ -127,34 +127,54 @@ void GuildRecv::processGuildBasicInfo(Net::MessageIn &msg)
showBasicInfo = false;
// TRANSLATORS: guild info message
guildTab->chatLog(strprintf(_("Guild name: %s"),
- name.c_str()), ChatMsgType::BY_SERVER);
+ name.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
if (!master.empty())
{
// TRANSLATORS: guild info message
guildTab->chatLog(strprintf(_("Guild master: %s"),
- master.c_str()), ChatMsgType::BY_SERVER);
+ master.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
// TRANSLATORS: guild info message
guildTab->chatLog(strprintf(_("Guild level: %d"), level),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
- guildTab->chatLog(strprintf(_("Online members: %d"),
- members), ChatMsgType::BY_SERVER);
+ guildTab->chatLog(strprintf(_("Online members: %d"), members),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
- guildTab->chatLog(strprintf(_("Max members: %d"),
- maxMembers), ChatMsgType::BY_SERVER);
+ guildTab->chatLog(strprintf(_("Max members: %d"), maxMembers),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
- guildTab->chatLog(strprintf(_("Average level: %d"),
- avgLevel), ChatMsgType::BY_SERVER);
+ guildTab->chatLog(strprintf(_("Average level: %d"), avgLevel),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
guildTab->chatLog(strprintf(_("Guild exp: %d"), exp),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
- guildTab->chatLog(strprintf(_("Guild next exp: %d"),
- nextExp), ChatMsgType::BY_SERVER);
+ guildTab->chatLog(strprintf(_("Guild next exp: %d"), nextExp),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: guild info message
- guildTab->chatLog(strprintf(_("Guild castle: %s"),
- castle.c_str()), ChatMsgType::BY_SERVER);
+ guildTab->chatLog(strprintf(_("Guild castle: %s"), castle.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
Guild *const g = Guild::getGuild(CAST_S16(guildId));
@@ -381,8 +401,14 @@ void GuildRecv::processGuildNotice(Net::MessageIn &msg)
{
const std::string msg1 = msg.readString(60, "msg1");
const std::string msg2 = msg.readString(120, "msg2");
- guildTab->chatLog(msg1, ChatMsgType::BY_SERVER);
- guildTab->chatLog(msg2, ChatMsgType::BY_SERVER);
+ guildTab->chatLog(msg1,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ guildTab->chatLog(msg2,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
@@ -498,7 +524,10 @@ void GuildRecv::processGuildMessage(Net::MessageIn &msg)
}
else
{
- guildTab->chatLog(chatMsg, ChatMsgType::BY_SERVER);
+ guildTab->chatLog(chatMsg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
diff --git a/src/net/tmwa/chatrecv.cpp b/src/net/tmwa/chatrecv.cpp
index afa501004..a23dc92a4 100644
--- a/src/net/tmwa/chatrecv.cpp
+++ b/src/net/tmwa/chatrecv.cpp
@@ -272,7 +272,10 @@ void ChatRecv::processWhisperContinue(const std::string &nick,
const size_t pos = chatMsg.find(": ", 0);
if (pos == std::string::npos)
{
- gmChatTab->chatLog(chatMsg, ChatMsgType::BY_SERVER);
+ gmChatTab->chatLog(chatMsg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
@@ -282,7 +285,10 @@ void ChatRecv::processWhisperContinue(const std::string &nick,
}
else
{
- localChatTab->chatLog(chatMsg, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(chatMsg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
BLOCK_END("ChatRecv::processWhisper")
@@ -371,7 +377,10 @@ void ChatRecv::processScriptMessage(Net::MessageIn &msg)
const int sz = msg.readInt16("len") - 5;
msg.readUInt8("message type");
const std::string message = msg.readString(sz, "message");
- localChatTab->chatLog(message, ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(message,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
} // namespace TmwAthena
diff --git a/src/net/tmwa/guildmanager.cpp b/src/net/tmwa/guildmanager.cpp
index 5484f1b51..df73a6c40 100644
--- a/src/net/tmwa/guildmanager.cpp
+++ b/src/net/tmwa/guildmanager.cpp
@@ -448,7 +448,10 @@ bool GuildManager::process(std::string msg)
const std::string sender_name = msg.substr(0, pos);
if (guild->getMember(sender_name) == nullptr)
{
- mTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ mTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
@@ -461,7 +464,10 @@ bool GuildManager::process(std::string msg)
}
else
{
- mTab->chatLog(msg, ChatMsgType::BY_SERVER);
+ mTab->chatLog(msg,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
diff --git a/src/notifymanager.cpp b/src/notifymanager.cpp
index 738ebda8c..af07cbc4f 100644
--- a/src/notifymanager.cpp
+++ b/src/notifymanager.cpp
@@ -63,9 +63,19 @@ namespace NotifyManager
if (str.empty())
return;
if (tab != nullptr)
- tab->chatLog(str, ChatMsgType::BY_SERVER);
+ {
+ tab->chatLog(str,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
else if (debugChatTab != nullptr)
- debugChatTab->chatLog(str, ChatMsgType::BY_SERVER);
+ {
+ debugChatTab->chatLog(str,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
}
void notify(const unsigned int message)
@@ -86,7 +96,9 @@ namespace NotifyManager
{
case NotifyFlags::EMPTY:
localChatTab->chatLog(gettext(info.text),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
case NotifyFlags::GUILD:
@@ -133,8 +145,11 @@ namespace NotifyManager
if (info.flags == NotifyFlags::INT &&
*info.text != 0)
{
- localChatTab->chatLog(strprintf(gettext(info.text),
- num), ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(
+ strprintf(gettext(info.text), num),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
soundManager.playSfx(SoundDB::getSound(message));
}
@@ -156,8 +171,11 @@ namespace NotifyManager
{
case NotifyFlags::STRING:
{
- localChatTab->chatLog(strprintf(gettext(info.text),
- str.c_str()), ChatMsgType::BY_SERVER);
+ localChatTab->chatLog(
+ strprintf(gettext(info.text), str.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
}
case NotifyFlags::GUILD_STRING:
diff --git a/src/progs/manaplus/actions/actions.cpp b/src/progs/manaplus/actions/actions.cpp
index 9ef8b0865..d71ba50a5 100644
--- a/src/progs/manaplus/actions/actions.cpp
+++ b/src/progs/manaplus/actions/actions.cpp
@@ -1023,12 +1023,16 @@ impHandler0(ipcToggle)
if (ipc == nullptr)
{
debugChatTab->chatLog("IPC service stopped.",
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
debugChatTab->chatLog("Unable to stop IPC service.",
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
else
@@ -1038,12 +1042,16 @@ impHandler0(ipcToggle)
{
debugChatTab->chatLog(
strprintf("IPC service available on port %d", ipc->getPort()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
debugChatTab->chatLog("Unable to start IPC service",
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -1058,7 +1066,10 @@ impHandler(where)
where << Game::instance()->getCurrentMapName() << ", coordinates: "
<< ((localPlayer->getPixelX() - mapTileSize / 2) / mapTileSize)
<< ", " << ((localPlayer->getPixelY() - mapTileSize) / mapTileSize);
- tab->chatLog(where.str(), ChatMsgType::BY_SERVER);
+ tab->chatLog(where.str(),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
@@ -1077,7 +1088,9 @@ impHandler0(cleanGraphics)
{
// TRANSLATORS: clear graphics command message
debugChatTab->chatLog(_("Cache cleared"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1090,7 +1103,9 @@ impHandler0(cleanFonts)
{
// TRANSLATORS: clear fonts cache message
debugChatTab->chatLog(_("Cache cleared"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1151,7 +1166,10 @@ impHandler0(cacheInfo)
unsigned int all = 0;
// TRANSLATORS: chat fonts message
- debugChatTab->chatLog(_("font cache size"), ChatMsgType::BY_SERVER);
+ debugChatTab->chatLog(_("font cache size"),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
std::string str;
for (int f = 0; f < 256; f ++)
{
@@ -1162,20 +1180,32 @@ impHandler0(cacheInfo)
str.append(strprintf("%d: %u, ", f, sz));
}
}
- debugChatTab->chatLog(str, ChatMsgType::BY_SERVER);
+ debugChatTab->chatLog(str,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
// TRANSLATORS: chat fonts message
debugChatTab->chatLog(strprintf("%s %d", _("Cache size:"), all),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
#ifdef DEBUG_FONT_COUNTERS
- debugChatTab->chatLog("", ChatMsgType::BY_SERVER);
+ debugChatTab->chatLog("",
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
debugChatTab->chatLog(strprintf("%s %d",
// TRANSLATORS: chat fonts message
_("Created:"), font->getCreateCounter()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
debugChatTab->chatLog(strprintf("%s %d",
// TRANSLATORS: chat fonts message
_("Deleted:"), font->getDeleteCounter()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
#endif
*/
return true;
@@ -1240,16 +1270,24 @@ impHandler0(dirs)
debugChatTab->chatLog("config directory: "
+ settings.configDir,
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
debugChatTab->chatLog("logs directory: "
+ settings.localDataDir,
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
debugChatTab->chatLog("screenshots directory: "
+ settings.screenshotDir,
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
debugChatTab->chatLog("temp directory: "
+ settings.tempDir,
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
@@ -1262,14 +1300,18 @@ impHandler0(uptime)
{
// TRANSLATORS: uptime command
debugChatTab->chatLog(strprintf(_("Client uptime: %s"), "unknown"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
// TRANSLATORS: uptime command
debugChatTab->chatLog(strprintf(_("Client uptime: %s"),
timeDiffToString(CAST_S32(cur_time - start_time)).c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1282,7 +1324,12 @@ static void showRes(std::string str, ResourceManager::Resources *res)
str.append(toString(res->size()));
if (debugChatTab)
- debugChatTab->chatLog(str, ChatMsgType::BY_SERVER);
+ {
+ debugChatTab->chatLog(str,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
logger->log(str);
ResourceManager::ResourceIterator iter = res->begin();
const ResourceManager::ResourceIterator iter_end = res->end();
@@ -1334,12 +1381,16 @@ impHandler(dump)
ResourceManager::Resources *res = ResourceManager::getResources();
// TRANSLATORS: dump command
debugChatTab->chatLog(_("Resource images:") + toString(res->size()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
res = ResourceManager::getOrphanedResources();
// TRANSLATORS: dump command
debugChatTab->chatLog(_("Orphaned resource images:")
+ toString(res->size()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1435,7 +1486,9 @@ impHandler0(dumpEnvironment)
{
// TRANSLATORS: dump environment command
debugChatTab->chatLog(_("Environment variables dumped"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1522,7 +1575,9 @@ impHandler0(testSdlFont)
if (debugChatTab)
{
debugChatTab->chatLog("sdlfont time: " + toString(diff),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1846,7 +1901,9 @@ impHandler(seen)
// TRANSLATORS: last seen disabled warning
tab->chatLog(_("Last seen disabled. "
"Enable in players / collect players ID and seen log."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
@@ -1864,7 +1921,9 @@ impHandler(seen)
{
// TRANSLATORS: last seen error
tab->chatLog(_("You have never seen this nick."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
const std::string message = strprintf(
@@ -1872,13 +1931,18 @@ impHandler(seen)
_("Last seen for %s: %s"),
name.c_str(),
lines[2].c_str());
- tab->chatLog(message, ChatMsgType::BY_SERVER);
+ tab->chatLog(message,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
// TRANSLATORS: last seen error
tab->chatLog(_("You have not seen this nick before."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
diff --git a/src/progs/manaplus/actions/chat.cpp b/src/progs/manaplus/actions/chat.cpp
index 307e4556e..2440af9af 100644
--- a/src/progs/manaplus/actions/chat.cpp
+++ b/src/progs/manaplus/actions/chat.cpp
@@ -272,7 +272,9 @@ impHandler(msg)
event.tab->chatLog(
// TRANSLATORS: whisper send
_("Cannot send empty whisper or channel message!"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -325,7 +327,10 @@ impHandler(query)
// TRANSLATORS: new whisper or channel query
event.tab->chatLog(strprintf(_("Cannot create a whisper tab "
"\"%s\"! It probably already exists."),
- args.c_str()), ChatMsgType::BY_SERVER);
+ args.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -394,7 +399,9 @@ impHandler(party)
{
// TRANSLATORS: party invite message
event.tab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -428,13 +435,17 @@ impHandler(guild)
{
// TRANSLATORS: guild invite message
event.tab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else if (localChatTab != nullptr)
{
// TRANSLATORS: guild invite message
localChatTab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -455,7 +466,9 @@ impHandler(toggle)
event.tab->chatLog(chatWindow->getReturnTogglesChat() ?
// TRANSLATORS: message from toggle chat command
_("Return toggles chat.") : _("Message closes chat."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -467,7 +480,9 @@ impHandler(toggle)
{
// TRANSLATORS: message from toggle chat command
event.tab->chatLog(_("Return now toggles chat."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
if (chatWindow != nullptr)
chatWindow->setReturnTogglesChat(true);
@@ -477,7 +492,9 @@ impHandler(toggle)
{
// TRANSLATORS: message from toggle chat command
event.tab->chatLog(_("Message now closes chat."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
if (chatWindow != nullptr)
chatWindow->setReturnTogglesChat(false);
@@ -486,7 +503,9 @@ impHandler(toggle)
if (event.tab != nullptr)
{
event.tab->chatLog(strprintf(BOOLEAN_OPTIONS, "toggle"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
default:
@@ -507,7 +526,9 @@ impHandler(kickParty)
{
// TRANSLATORS: party kick message
event.tab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -542,7 +563,9 @@ impHandler(kickGuild)
{
// TRANSLATORS: party kick message
event.tab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
return true;
@@ -717,7 +740,9 @@ impHandler(translate)
// TRANSLATORS: translation error message
strprintf(_("No translation found for string: %s"),
srcStr.c_str()),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
}
diff --git a/src/progs/manaplus/actions/commands.cpp b/src/progs/manaplus/actions/commands.cpp
index f2d49b13b..765d1ceb1 100644
--- a/src/progs/manaplus/actions/commands.cpp
+++ b/src/progs/manaplus/actions/commands.cpp
@@ -106,7 +106,9 @@ static std::string getNick(const InputEvent &event)
{
// TRANSLATORS: change relation
event.tab->chatLog(_("Please specify a name."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return std::string();
}
args = whisper->getNick();
@@ -124,12 +126,18 @@ static void reportRelation(const InputEvent &event,
if (playerRelations.getRelation(event.args) == rel)
{
// TRANSLATORS: unignore command
- event.tab->chatLog(str1, ChatMsgType::BY_SERVER);
+ event.tab->chatLog(str1,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
else
{
// TRANSLATORS: unignore command
- event.tab->chatLog(str2, ChatMsgType::BY_SERVER);
+ event.tab->chatLog(str2,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
}
}
@@ -148,7 +156,10 @@ static void changeRelation(const InputEvent &event,
{
// TRANSLATORS: change relation
event.tab->chatLog(strprintf(_("Player already %s!"),
- relationText.c_str()), ChatMsgType::BY_SERVER);
+ relationText.c_str()),
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return;
}
}
@@ -198,7 +209,9 @@ impHandler(chatUnignore)
{
// TRANSLATORS: unignore command
event.tab->chatLog(_("Player wasn't ignored!"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -224,7 +237,9 @@ impHandler(chatErase)
{
// TRANSLATORS: erase command
event.tab->chatLog(_("Player already erased!"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
return true;
}
@@ -1779,22 +1794,30 @@ impHandler(partyItemShare)
case PartyShare::YES:
// TRANSLATORS: chat message
tab->chatLog(_("Item sharing enabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NO:
// TRANSLATORS: chat message
tab->chatLog(_("Item sharing disabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NOT_POSSIBLE:
// TRANSLATORS: chat message
tab->chatLog(_("Item sharing not possible."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::UNKNOWN:
// TRANSLATORS: chat message
tab->chatLog(_("Item sharing unknown."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
default:
break;
@@ -1815,7 +1838,9 @@ impHandler(partyItemShare)
break;
case -1:
tab->chatLog(strprintf(BOOLEAN_OPTIONS, "item"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
default:
break;
@@ -1845,22 +1870,30 @@ impHandler(partyExpShare)
case PartyShare::YES:
// TRANSLATORS: chat message
tab->chatLog(_("Experience sharing enabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NO:
// TRANSLATORS: chat message
tab->chatLog(_("Experience sharing disabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NOT_POSSIBLE:
// TRANSLATORS: chat message
tab->chatLog(_("Experience sharing not possible."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::UNKNOWN:
// TRANSLATORS: chat message
tab->chatLog(_("Experience sharing unknown."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
default:
break;
@@ -1881,7 +1914,9 @@ impHandler(partyExpShare)
break;
case -1:
tab->chatLog(strprintf(BOOLEAN_OPTIONS, "exp"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
default:
break;
@@ -1911,22 +1946,30 @@ impHandler(partyAutoItemShare)
case PartyShare::YES:
// TRANSLATORS: chat message
tab->chatLog(_("Auto item sharing enabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NO:
// TRANSLATORS: chat message
tab->chatLog(_("Auto item sharing disabled."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::NOT_POSSIBLE:
// TRANSLATORS: chat message
tab->chatLog(_("Auto item sharing not possible."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
case PartyShare::UNKNOWN:
// TRANSLATORS: chat message
tab->chatLog(_("Auto item sharing unknown."),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
return true;
default:
break;
@@ -1947,7 +1990,9 @@ impHandler(partyAutoItemShare)
break;
case -1:
tab->chatLog(strprintf(BOOLEAN_OPTIONS, "item"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
break;
default:
break;
diff --git a/src/progs/manaplus/actions/statusbar.cpp b/src/progs/manaplus/actions/statusbar.cpp
index 0d5ba68cd..c659c041c 100644
--- a/src/progs/manaplus/actions/statusbar.cpp
+++ b/src/progs/manaplus/actions/statusbar.cpp
@@ -178,7 +178,9 @@ impHandler0(changeTrade)
{
// TRANSLATORS: disable trades message
localChatTab->chatLog(_("Ignoring incoming trade requests"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
deflt &= ~PlayerRelation::TRADE;
}
@@ -188,7 +190,9 @@ impHandler0(changeTrade)
{
// TRANSLATORS: enable trades message
localChatTab->chatLog(_("Accepting incoming trade requests"),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
deflt |= PlayerRelation::TRADE;
}
diff --git a/src/resources/memorymanager.cpp b/src/resources/memorymanager.cpp
index 466a14d61..b7a4224a2 100644
--- a/src/resources/memorymanager.cpp
+++ b/src/resources/memorymanager.cpp
@@ -93,7 +93,9 @@ void MemoryManager::printAllMemory(ChatTab *const tab A_DYECMD_UNUSED)
{
// TRANSLATORS: memory usage chat message
tab->chatLog(strprintf(_("Calculated memory usage: %d"), sz),
- ChatMsgType::BY_SERVER);
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
}
#endif // DYECMD
}
diff --git a/src/statuseffect.cpp b/src/statuseffect.cpp
index 7cd71a5d7..0ff4b2b6a 100644
--- a/src/statuseffect.cpp
+++ b/src/statuseffect.cpp
@@ -64,8 +64,14 @@ void StatusEffect::playSFX() const
void StatusEffect::deliverMessage() const
{
- if (!mMessage.empty() && (localChatTab != nullptr))
- localChatTab->chatLog(mMessage, ChatMsgType::BY_SERVER);
+ if (!mMessage.empty() &&
+ localChatTab != nullptr)
+ {
+ localChatTab->chatLog(mMessage,
+ ChatMsgType::BY_SERVER,
+ IgnoreRecord_false,
+ TryRemoveColors_true);
+ }
}
Particle *StatusEffect::getStartParticle() const