summaryrefslogtreecommitdiffstats
path: root/src/GroupManager.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-14 03:02:26 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2013-12-14 03:02:26 +0100
commit4e11095441fc98e59611008735949900d72d7465 (patch)
tree7f4c8df376a132bbbe4fcc2c937c0ecae3fc8051 /src/GroupManager.cpp
parentRemoved loads of unneeded code again (diff)
downloadcuberite-4e11095441fc98e59611008735949900d72d7465.tar
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.gz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.bz2
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.lz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.xz
cuberite-4e11095441fc98e59611008735949900d72d7465.tar.zst
cuberite-4e11095441fc98e59611008735949900d72d7465.zip
Diffstat (limited to 'src/GroupManager.cpp')
-rw-r--r--src/GroupManager.cpp21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/GroupManager.cpp b/src/GroupManager.cpp
index df609f05b..1ffe3812f 100644
--- a/src/GroupManager.cpp
+++ b/src/GroupManager.cpp
@@ -47,8 +47,25 @@ cGroupManager::cGroupManager()
cIniFile IniFile;
if (!IniFile.ReadFile("groups.ini"))
{
- LOGWARNING("groups.ini inaccessible, no groups are defined");
- return;
+ LOGWARNING("Regenerating groups.ini, all groups will be reset");
+ IniFile.AddHeaderComment(" This is the MCServer permissions manager groups file");
+ IniFile.AddHeaderComment(" It stores all defined groups such as Administrators, Players, or Moderators");
+
+ IniFile.SetValue("Owner", "Permissions", "*", true);
+ IniFile.SetValue("Owner", "Color", "2", true);
+
+ IniFile.SetValue("Moderator", "Permissions", "core.time,core.item,core.teleport,core.ban,core.unban,core.save-all,core.toggledownfall");
+ IniFile.SetValue("Moderator", "Color", "2", true);
+ IniFile.SetValue("Moderator", "Inherits", "Player", true);
+
+ IniFile.SetValue("Player", "Permissions", "core.build", true);
+ IniFile.SetValue("Player", "Color", "f", true);
+ IniFile.SetValue("Player", "Inherits", "Default", true);
+
+ IniFile.SetValue("Default", "Permissions", "core.help,core.playerlist,core.pluginlist,core.spawn,core.listworlds,core.back,core.motd,core.gotoworld,core.coords,core.viewdistance", true);
+ IniFile.SetValue("Default", "Color", "f", true);
+
+ IniFile.WriteFile("groups.ini");
}
unsigned int NumKeys = IniFile.GetNumKeys();