summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
commitd9a429ec6463818b50f3c930732abaa29e0af558 (patch)
treeb1024f5001265301ed1ca6e23bd6d5c325e825fd /src/Entities/Player.cpp
parentfixed unused expression warnings in blockFire (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.gz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.bz2
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.lz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.xz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.zst
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.zip
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp9
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;