made it so newlines arn't parsed and added avaliable permissions to groups.txt

This commit is contained in:
Maverick Motherfucker 2011-06-04 09:45:23 -07:00
parent c895369ff6
commit cfd3cbf5a3
2 changed files with 11 additions and 1 deletions

View file

@ -336,6 +336,10 @@ namespace TShockAPI
continue; continue;
} }
string[] args = lines[i].Split(' '); string[] args = lines[i].Split(' ');
if (args.Length < 2)
{
continue;
}
string name = args[0]; string name = args[0];
string parent = args[1]; string parent = args[1];
Group group = null; Group group = null;
@ -422,6 +426,10 @@ namespace TShockAPI
for (int i = 0; i < lines.Length; i++) for (int i = 0; i < lines.Length; i++)
{ {
string[] args = lines[i].Split(' '); string[] args = lines[i].Split(' ');
if (args.Length < 2)
{
continue;
}
if (args[0].Equals(ip)) if (args[0].Equals(ip))
{ {
return GetGroup(args[1]); return GetGroup(args[1]);

View file

@ -3,10 +3,12 @@
#if there is no parent, put null instead #if there is no parent, put null instead
#groups inherit permissions from their parents #groups inherit permissions from their parents
#put a ! before a permission to negate it #put a ! before a permission to negate it
#currently avaliable permissions: kick ban ignorecheatdetection
#Do not remove the group default #Do not remove the group default
#Do not name a group SuperAdmin, that is hard-coded into the code, it grants total permissions #Do not name a group SuperAdmin, that is hard-coded into the code, it grants total permissions
#ALWAYS DECLARE A GROUP'S PARENT BEFORE YOU DECLARE THE GROUP #ALWAYS DECLARE A GROUP'S PARENT BEFORE YOU DECLARE THE GROUP
#currently avaliable permissions: kick ban ignorecheatdetection power cfg causeevents spawnboss tp spawnmob cheat kill pvpfun
default null kill default null kill
newadmin default kick newadmin default kick
admin newadmin ban causeevents spawnboss spawnmob tp admin newadmin ban causeevents spawnboss spawnmob tp