1
0

Groups.ini and Users.ini are now generated

This commit is contained in:
Tiger Wang
2013-12-14 02:02:26 +00:00
parent d94ee0fa79
commit 4e11095441
6 changed files with 25 additions and 52 deletions

View File

@@ -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();