summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-14 03:02:26 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-14 03:02:26 +0100
commit4e11095441fc98e59611008735949900d72d7465 (patch)
tree7f4c8df376a132bbbe4fcc2c937c0ecae3fc8051 /src/Entities
parentRemoved loads of unneeded code again (diff)
downloadcuberite-4e11095441fc98e59611008735949900d72d7465.tar
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.gz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.bz2
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.lz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.xz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.zst
cuberite-4e11095441fc98e59611008735949900d72d7465.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/Player.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 7a5ff5696..ff519f890 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();