From 4e11095441fc98e59611008735949900d72d7465 Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Sat, 14 Dec 2013 02:02:26 +0000 Subject: Groups.ini and Users.ini are now generated --- src/Entities/Player.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/Entities') 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(); -- cgit v1.2.3