Fix group inheritance

This commit is contained in:
Twitchy 2011-08-01 16:46:42 +12:00
parent b1a64267bb
commit f95fdf5085

View file

@ -171,8 +171,7 @@ namespace TShockAPI.DB
try try
{ {
using (var reader = database.QueryReader("SELECT * FROM Grouplist"))
using (var reader = database.QueryReader("SELECT * FROM Grouplist;"))
{ {
while (reader.Read()) while (reader.Read())
{ {
@ -186,6 +185,8 @@ namespace TShockAPI.DB
{ {
group.AddPermission(commands[i].Trim()); group.AddPermission(commands[i].Trim());
} }
try
{
String[] chatcolour = reader.Get<String>("ChatColor").Split(','); String[] chatcolour = reader.Get<String>("ChatColor").Split(',');
if (chatcolour.Length == 3) if (chatcolour.Length == 3)
{ {
@ -193,6 +194,8 @@ namespace TShockAPI.DB
byte.TryParse(chatcolour[1], out group.G); byte.TryParse(chatcolour[1], out group.G);
byte.TryParse(chatcolour[2], out group.B); byte.TryParse(chatcolour[2], out group.B);
} }
}
catch { }
groups.Add(group); groups.Add(group);
} }
} }