summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2013-12-24 16:55:15 +0100
committerAlexander Harkness <bearbin@gmail.com>2013-12-24 16:55:15 +0100
commitf2d2b4fecbb09150332d390412e55161e247b89b (patch)
tree85c19a2161f493efce0efee36f7f7569b644a143 /src
parentMerge pull request #466 from Sxw1212/master (diff)
parentremoved the function def also (diff)
downloadcuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar.gz
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar.bz2
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar.lz
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar.xz
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.tar.zst
cuberite-f2d2b4fecbb09150332d390412e55161e247b89b.zip
Diffstat (limited to '')
-rw-r--r--src/ChatColor.cpp7
-rw-r--r--src/ChatColor.h17
-rw-r--r--src/Entities/Player.cpp2
-rw-r--r--src/GroupManager.cpp6
4 files changed, 12 insertions, 20 deletions
diff --git a/src/ChatColor.cpp b/src/ChatColor.cpp
index 2b223ee76..72a0a6928 100644
--- a/src/ChatColor.cpp
+++ b/src/ChatColor.cpp
@@ -1,4 +1,3 @@
-
#include "Globals.h" // NOTE: MSVC stupidness requires this to be the same across all modules
#include "ChatColor.h"
@@ -29,11 +28,5 @@ const std::string cChatColor::Underlined = cChatColor::Color + "n";
const std::string cChatColor::Italic = cChatColor::Color + "o";
const std::string cChatColor::Plain = cChatColor::Color + "r";
-const std::string cChatColor::MakeColor( char a_Color )
-{
- return cChatColor::Color + a_Color;
-}
-
-
diff --git a/src/ChatColor.h b/src/ChatColor.h
index 85b10f400..643c4d5d8 100644
--- a/src/ChatColor.h
+++ b/src/ChatColor.h
@@ -29,15 +29,14 @@ public:
static const std::string Yellow;
static const std::string White;
- // Styles ( source: http://wiki.vg/Chat )
- static const std::string Random;
- static const std::string Bold;
- static const std::string Strikethrough;
- static const std::string Underlined;
- static const std::string Italic;
- static const std::string Plain;
-
- static const std::string MakeColor( char a_Color );
+ // Styles ( source: http://wiki.vg/Chat )
+ static const std::string Random;
+ static const std::string Bold;
+ static const std::string Strikethrough;
+ static const std::string Underlined;
+ static const std::string Italic;
+ static const std::string Plain;
+
};
// tolua_end
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 948a259ff..b923a094e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1294,7 +1294,7 @@ AString cPlayer::GetColor(void) const
{
if ( m_Color != '-' )
{
- return cChatColor::MakeColor( m_Color );
+ return cChatColor::Color + m_Color;
}
if ( m_Groups.size() < 1 )
diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp
index 1ffe3812f..792acc2c3 100644
--- a/src/GroupManager.cpp
+++ b/src/GroupManager.cpp
@@ -79,11 +79,11 @@ cGroupManager::cGroupManager()
Group->SetName( KeyName );
char Color = IniFile.GetValue( KeyName, "Color", "-" )[0];
if( Color != '-' )
- Group->SetColor( cChatColor::MakeColor(Color) );
+ Group->SetColor( cChatColor::Color + Color );
else
Group->SetColor( cChatColor::White );
- std::string Commands = IniFile.GetValue( KeyName, "Commands", "" );
+ AString Commands = IniFile.GetValue( KeyName, "Commands", "" );
if( Commands.size() > 0 )
{
AStringVector Split = StringSplit( Commands, "," );
@@ -93,7 +93,7 @@ cGroupManager::cGroupManager()
}
}
- std::string Permissions = IniFile.GetValue( KeyName, "Permissions", "" );
+ AString Permissions = IniFile.GetValue( KeyName, "Permissions", "" );
if( Permissions.size() > 0 )
{
AStringVector Split = StringSplit( Permissions, "," );