summaryrefslogtreecommitdiffstats
path: root/src/GroupManager.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-02-28 15:31:20 +0100
committermadmaxoft <github@xoft.cz>2014-02-28 15:31:20 +0100
commit35def963f06dd46823300aebf09af0009189328b (patch)
treefc0d265c181ccd5025e790b23db0f760eaa85232 /src/GroupManager.cpp
parentMerge pull request #709 from Howaner/GlobalFixes (diff)
downloadcuberite-35def963f06dd46823300aebf09af0009189328b.tar
cuberite-35def963f06dd46823300aebf09af0009189328b.tar.gz
cuberite-35def963f06dd46823300aebf09af0009189328b.tar.bz2
cuberite-35def963f06dd46823300aebf09af0009189328b.tar.lz
cuberite-35def963f06dd46823300aebf09af0009189328b.tar.xz
cuberite-35def963f06dd46823300aebf09af0009189328b.tar.zst
cuberite-35def963f06dd46823300aebf09af0009189328b.zip
Diffstat (limited to '')
-rw-r--r--src/GroupManager.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp
index 5125e7586..33b601e82 100644
--- a/src/GroupManager.cpp
+++ b/src/GroupManager.cpp
@@ -55,16 +55,27 @@ cGroupManager::cGroupManager()
+void cGroupManager::GenerateDefaultUsersIni(cIniFile & a_IniFile)
+{
+ LOGWARN("Regenerating users.ini, all users will be reset");
+ a_IniFile.AddHeaderComment(" This file stores the players' groups.");
+ a_IniFile.AddHeaderComment(" The format is:");
+ a_IniFile.AddHeaderComment(" [PlayerName]");
+ a_IniFile.AddHeaderComment(" Groups = GroupName1, GroupName2, ...");
+
+ a_IniFile.WriteFile("users.ini");
+}
+
+
+
+
+
void cGroupManager::CheckUsers(void)
{
cIniFile IniFile;
if (!IniFile.ReadFile("users.ini"))
{
- LOGWARN("Regenerating users.ini, all users will be reset");
- 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.WriteFile("users.ini");
+ GenerateDefaultUsersIni(IniFile);
return;
}