summaryrefslogtreecommitdiff
path: root/src/gui/chatwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/chatwindow.cpp')
-rw-r--r--src/gui/chatwindow.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp
index 7969f55f8..35b89b839 100644
--- a/src/gui/chatwindow.cpp
+++ b/src/gui/chatwindow.cpp
@@ -149,7 +149,7 @@ public:
ChatWindow::ChatWindow():
- Window(_("Chat"), false, 0, "chat.xml"),
+ Window(_("Chat"), false, nullptr, "chat.xml"),
mTmpVisible(false),
mChatHistoryIndex(0)
{
@@ -222,11 +222,11 @@ ChatWindow::~ChatWindow()
config.setValue("ReturnToggles", mReturnToggles);
removeAllWhispers();
delete mItemLinkHandler;
- mItemLinkHandler = 0;
+ mItemLinkHandler = nullptr;
delete mColorPicker;
- mColorPicker = 0;
+ mColorPicker = nullptr;
delete mColorListModel;
- mColorListModel = 0;
+ mColorListModel = nullptr;
}
void ChatWindow::fillCommands()
@@ -294,9 +294,11 @@ void ChatWindow::fillCommands()
mCommands.push_back("/removeattack ");
mCommands.push_back("/addignoreattack ");
mCommands.push_back("/blacklist ");
+ mCommands.push_back("/enemy ");
mCommands.push_back("/serverignoreall");
mCommands.push_back("/serverunignoreall");
mCommands.push_back("/dumpg");
+ mCommands.push_back("/pseudoaway ");
}
void ChatWindow::resetToDefaultSize()
@@ -555,13 +557,13 @@ void ChatWindow::ignoreAllWhispers()
}
delete(iter->second);
- iter->second = 0;
+ iter->second = nullptr;
}
}
void ChatWindow::chatInput(const std::string &message)
{
- ChatTab *tab = NULL;
+ ChatTab *tab = nullptr;
std::string msg = message;
trim(msg);
@@ -937,7 +939,7 @@ void ChatWindow::addWhisper(const std::string &nick,
if (tempNick.compare(playerName) == 0)
return;
- ChatTab *tab = 0;
+ ChatTab *tab = nullptr;
TabMap::const_iterator i = mWhispers.find(tempNick);
if (i != mWhispers.end())
@@ -1004,7 +1006,7 @@ void ChatWindow::addWhisper(const std::string &nick,
{
localChatTab->chatLog(nick + " : " + mes, ACT_WHISPER, false);
if (player_node)
- player_node->afkRespond(0, nick);
+ player_node->afkRespond(nullptr, nick);
}
}
}
@@ -1012,7 +1014,7 @@ void ChatWindow::addWhisper(const std::string &nick,
ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo)
{
if (!player_node)
- return NULL;
+ return nullptr;
std::string playerName = player_node->getName();
std::string tempNick = nick;
@@ -1024,7 +1026,7 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo)
ChatTab *ret;
if (tempNick.compare(playerName) == 0)
- return NULL;
+ return nullptr;
if (i != mWhispers.end())
{
@@ -1049,7 +1051,7 @@ ChatTab *ChatWindow::addWhisperTab(const std::string &nick, bool switchTo)
ChatTab *ChatWindow::getWhisperTab(const std::string &nick) const
{
if (!player_node)
- return NULL;
+ return nullptr;
std::string playerName = player_node->getName();
std::string tempNick = nick;
@@ -1058,10 +1060,10 @@ ChatTab *ChatWindow::getWhisperTab(const std::string &nick) const
toLower(tempNick);
TabMap::const_iterator i = mWhispers.find(tempNick);
- ChatTab *ret = 0;
+ ChatTab *ret = nullptr;
if (tempNick.compare(playerName) == 0)
- return NULL;
+ return nullptr;
if (i != mWhispers.end())
ret = i->second;
@@ -1348,8 +1350,8 @@ void ChatWindow::initTradeFilter()
void ChatWindow::updateOnline(std::set<std::string> &onlinePlayers)
{
TabMap::const_iterator iter;
- const Party *party = 0;
- const Guild *guild = 0;
+ const Party *party = nullptr;
+ const Guild *guild = nullptr;
if (player_node)
{
party = player_node->getParty();
@@ -1499,7 +1501,7 @@ void ChatWindow::loadCustomList()
void ChatWindow::addToAwayLog(std::string line)
{
- if (!player_node || !player_node->getAwayMode())
+ if (!player_node || !player_node->getAway())
return;
if (mAwayLog.size() > 20)