diff options
author | madmaxoft <github@xoft.cz> | 2013-10-26 19:43:34 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-26 19:43:34 +0200 |
commit | 52f88b9595f28c3c14ab1868dbed1eba1093c078 (patch) | |
tree | c8e9a5174269258e5a5caa9a1a8d22fe7475a3f7 /source/Entities | |
parent | cMonster: Improved doxycomments. (diff) | |
parent | APIDump: Documented cIniFile. (diff) | |
download | cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.gz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.bz2 cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.lz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.xz cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.tar.zst cuberite-52f88b9595f28c3c14ab1868dbed1eba1093c078.zip |
Diffstat (limited to 'source/Entities')
-rw-r--r-- | source/Entities/Player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/Entities/Player.cpp b/source/Entities/Player.cpp index f92d42556..d94bc944c 100644 --- a/source/Entities/Player.cpp +++ b/source/Entities/Player.cpp @@ -1224,11 +1224,11 @@ void cPlayer::LoadPermissionsFromDisk() m_Groups.clear(); m_Permissions.clear(); - cIniFile IniFile("users.ini"); - if( IniFile.ReadFile() ) + cIniFile IniFile; + if (IniFile.ReadFile("users.ini")) { std::string Groups = IniFile.GetValue(m_PlayerName, "Groups", ""); - if( Groups.size() > 0 ) + if (!Groups.empty()) { AStringVector Split = StringSplit( Groups, "," ); for( unsigned int i = 0; i < Split.size(); i++ ) @@ -1245,7 +1245,7 @@ void cPlayer::LoadPermissionsFromDisk() } else { - LOGWARN("WARNING: Failed to read ini file users.ini"); + LOGWARN("Failed to read the users.ini file. The player will be added only to the Default group."); AddToGroup("Default"); } ResolvePermissions(); |