diff options
author | Mattes D <github@xoft.cz> | 2013-12-14 15:41:00 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2013-12-14 15:41:00 +0100 |
commit | 8a6c28b8f0234d839c83f2c61b4b82945d383897 (patch) | |
tree | de559158d89df0e5714c7f97f7da4f05e0e89c2f /src/Entities | |
parent | Merge branch 'master' of https://github.com/mc-server/MCServer (diff) | |
parent | Update Core (diff) | |
download | cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar.gz cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar.bz2 cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar.lz cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar.xz cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.tar.zst cuberite-8a6c28b8f0234d839c83f2c61b4b82945d383897.zip |
Diffstat (limited to 'src/Entities')
-rw-r--r-- | src/Entities/Player.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 7a5ff5696..85833f31d 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -1393,7 +1393,12 @@ void cPlayer::LoadPermissionsFromDisk() } else { - LOGWARN("Failed to read the users.ini file. The player will be added only to the Default group."); + LOGWARN("Regenerating users.ini, player %s will be added to the \"Default\" group", m_PlayerName.c_str()); + IniFile.AddHeaderComment(" This is the file in which the group the player belongs to is stored"); + IniFile.AddHeaderComment(" The format is: [PlayerName] | Groups=GroupName"); + + IniFile.SetValue(m_PlayerName, "Groups", "Default"); + IniFile.WriteFile("users.ini"); AddToGroup("Default"); } ResolvePermissions(); @@ -1410,7 +1415,7 @@ bool cPlayer::LoadFromDisk() LOGINFO("Player %s has permissions:", m_PlayerName.c_str() ); for( PermissionMap::iterator itr = m_ResolvedPermissions.begin(); itr != m_ResolvedPermissions.end(); ++itr ) { - if( itr->second ) LOGINFO("%s", itr->first.c_str() ); + if( itr->second ) LOG(" - %s", itr->first.c_str() ); } AString SourceFile; |