summaryrefslogtreecommitdiffstats
path: root/src/GroupManager.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:24 +0100
commitd9a429ec6463818b50f3c930732abaa29e0af558 (patch)
treeb1024f5001265301ed1ca6e23bd6d5c325e825fd /src/GroupManager.cpp
parentfixed unused expression warnings in blockFire (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.gz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.bz2
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.lz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.xz
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.tar.zst
cuberite-d9a429ec6463818b50f3c930732abaa29e0af558.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();