summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r--src/Entities/Player.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 0152bfc5b..e0f0b9222 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1532,7 +1532,11 @@ void cPlayer::LoadPermissionsFromDisk()
AStringVector Split = StringSplit( Groups, "," );
for( unsigned int i = 0; i < Split.size(); i++ )
{
- AddToGroup( Split[i].c_str() );
+ if (!cRoot::Get()->GetGroupManager()->ExistsGroup(Split[i]))
+ {
+ LOGWARNING("The group %s for player %s was not found!", Split[i].c_str(), m_PlayerName.c_str());
+ }
+ AddToGroup(Split[i].c_str());
}
}
else
@@ -1544,12 +1548,7 @@ void cPlayer::LoadPermissionsFromDisk()
}
else
{
- 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");
+ cRoot::Get()->GetGroupManager()->CheckUsers();
AddToGroup("Default");
}
ResolvePermissions();