summaryrefslogtreecommitdiffstats
path: root/src/GroupManager.cpp
diff options
context:
space:
mode:
authorTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:35 +0100
committerTycho Bickerstaff <work.tycho@gmail.com>2013-12-11 00:01:35 +0100
commitdd633d5a947771cd37f8a853ceb44660752a7e3c (patch)
tree0141233cb7025eaca681513b6670b325c76f57c1 /src/GroupManager.cpp
parentadded tolua++ command and removed stackwalker from build (diff)
parentMerge branch 'master' of https://github.com/mc-server/MCServer (diff)
downloadcuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar.gz
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar.bz2
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar.lz
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar.xz
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.tar.zst
cuberite-dd633d5a947771cd37f8a853ceb44660752a7e3c.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();