summaryrefslogtreecommitdiff
path: root/src/gui/chat.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2009-02-09 22:30:00 +0100
committerIra Rice <irarice@gmail.com>2009-02-09 17:10:37 -0700
commit1db7d10787f462430054ba04110a8d4647bdbd0a (patch)
tree60dc4d04c738b1f54a41bc9d9b6d0e5ffb0fb1d4 /src/gui/chat.cpp
parent1ae95b709235ce811ce72437aa257bb7500e00d0 (diff)
downloadmana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.gz
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.bz2
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.tar.xz
mana-1db7d10787f462430054ba04110a8d4647bdbd0a.zip
Mostly whitespace fixes
Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(".
Diffstat (limited to 'src/gui/chat.cpp')
-rw-r--r--src/gui/chat.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/chat.cpp b/src/gui/chat.cpp
index 2363fc50..92dd46d7 100644
--- a/src/gui/chat.cpp
+++ b/src/gui/chat.cpp
@@ -138,7 +138,7 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
}
std::string lineColor = "##C";
- switch (own)
+ switch (own)
{
case BY_GM:
if (tmp.nick.empty())
@@ -215,7 +215,7 @@ void ChatWindow::chatLog(std::string line, int own, bool ignoreRecord)
// adding a row, otherwise the max will always be a row higher
// at comparison.
if (mScrollArea->getVerticalScrollAmount() ==
- mScrollArea->getVerticalMaxScroll())
+ mScrollArea->getVerticalMaxScroll())
{
mTextOutput->addRow(line);
mScrollArea->setVerticalScrollAmount(mScrollArea->
@@ -341,7 +341,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
return;
// Send party message
- if (msg.at(0) == mPartyPrefix)
+ if (msg.at(0) == mPartyPrefix)
{
msg.erase(0, 1);
std::size_t length = msg.length() + 1;
@@ -367,7 +367,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
if (end != std::string::npos)
{
// Catch multiple embeds and ignore them so it doesn't crash the client.
- while ((msg.find('[', start + 1) != std::string::npos) &&
+ while ((msg.find('[', start + 1) != std::string::npos) &&
(msg.find('[', start + 1) < end))
{
start = msg.find('[', start + 1);
@@ -395,7 +395,7 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
}
// Prepare ordinary message
- if (msg.substr(0, 1) != "/")
+ if (msg.substr(0, 1) != "/")
{
msg = nick + " : " + msg;
@@ -423,14 +423,14 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
trim(msg);
}
- if (command == "announce")
+ if (command == "announce")
{
MessageOut outMsg(mNetwork);
outMsg.writeInt16(0x0099);
outMsg.writeInt16(msg.length() + 4);
outMsg.writeString(msg, msg.length());
}
- else if (command == "help")
+ else if (command == "help")
{
trim(msg);
std::size_t space = msg.find(" ");
@@ -483,16 +483,16 @@ void ChatWindow::chatSend(const std::string &nick, std::string msg)
msg = msg.substr(0, 1);
- if (msg == "1" ||
- msg == "y" || msg == "Y" ||
+ if (msg == "1" ||
+ msg == "y" || msg == "Y" ||
msg == "t" || msg == "T")
{
chatLog(_("Return now toggles chat."), BY_SERVER);
mReturnToggles = true;
return;
}
- else if (msg == "0" ||
- msg == "n" || msg == "N" ||
+ else if (msg == "0" ||
+ msg == "n" || msg == "N" ||
msg == "f" || msg == "F")
{
chatLog(_("Message now closes chat."), BY_SERVER);
@@ -787,7 +787,7 @@ void ChatWindow::party(const std::string & command, const std::string & rest)
void ChatWindow::help(const std::string & msg1, const std::string & msg2)
{
chatLog(_("-- Help --"), BY_SERVER);
- if (msg1 == "")
+ if (msg1 == "")
{
chatLog(_("/announce: Global announcement (GM only)"), BY_SERVER);
chatLog(_("/clear: Clears this window"), BY_SERVER);
@@ -827,18 +827,18 @@ void ChatWindow::help(const std::string & msg1, const std::string & msg2)
chatLog(_("Command: /help <command>"), BY_SERVER);
chatLog(_("This command displays help on <command>."), BY_SERVER);
}
- else if (msg1 == "party")
+ else if (msg1 == "party")
{
mParty->help(msg2);
}
- else if (msg1 == "present")
+ else if (msg1 == "present")
{
chatLog(_("Command: /present"), BY_SERVER);
chatLog(_("This command gets a list of players within hearing and "
"sends it to either the record log if recording, or the chat "
"log otherwise."), BY_SERVER);
}
- else if (msg1 == "record")
+ else if (msg1 == "record")
{
chatLog(_("Command: /record <filename>"), BY_SERVER);
chatLog(_("This command starts recording the chat log to the file "
@@ -846,10 +846,10 @@ void ChatWindow::help(const std::string & msg1, const std::string & msg2)
chatLog(_("Command: /record"), BY_SERVER);
chatLog(_("This command finishes a recording session."), BY_SERVER);
}
- else if (msg1 == "toggle")
+ else if (msg1 == "toggle")
{
chatLog(_("Command: /toggle <state>"), BY_SERVER);
- chatLog(_("This command sets whether the return key should toggle the"
+ chatLog(_("This command sets whether the return key should toggle the"
"chat log, or whether the chat log turns off automatically."),
BY_SERVER);
chatLog(_("<state> can be one of \"1\", \"yes\", \"true\" to "