summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-02-28 14:28:50 +0100
committerMattes D <github@xoft.cz>2014-02-28 14:28:50 +0100
commit6ad4b78a7ba00be58583b055f7d7227be465ec26 (patch)
tree1e5cc61a97bff757482193eb2ee50bb395bda5ec /src/Entities
parentAdded a MobDebug enabler script. (diff)
parentBetter Jukebox API (diff)
downloadcuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.gz
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.bz2
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.lz
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.xz
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.tar.zst
cuberite-6ad4b78a7ba00be58583b055f7d7227be465ec26.zip
Diffstat (limited to 'src/Entities')
-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();