did a debug session and fixed some errors

This commit is contained in:
Maverick Motherfucker 2011-06-03 22:00:46 -07:00
parent 273615f738
commit f5723ee834
3 changed files with 9 additions and 4 deletions

View file

@ -319,18 +319,22 @@ namespace TShockAPI
tr.Close();
}
private static void LoadGroups()
public static void LoadGroups()
{
groups = new List<Group>();
groups.Add(new SuperAdminGroup("superadmin"));
StreamReader sr = new StreamReader(FileTools.SaveDir + "groups.txt");
string data = sr.ReadToEnd();
data = data.Replace('\r', new char());
data = data.Replace("\r", "");
string[] lines = data.Split('\n');
for (int i = 0; i < lines.Length; i++)
{
if (lines[i].StartsWith("#"))
{
continue;
}
string[] args = lines[i].Split(' ');
string name = args[0];
string parent = args[1];