Fix group inheritance
This commit is contained in:
parent
b1a64267bb
commit
f95fdf5085
1 changed files with 10 additions and 7 deletions
|
|
@ -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,13 +185,17 @@ namespace TShockAPI.DB
|
||||||
{
|
{
|
||||||
group.AddPermission(commands[i].Trim());
|
group.AddPermission(commands[i].Trim());
|
||||||
}
|
}
|
||||||
String[] chatcolour = reader.Get<String>("ChatColor").Split(',');
|
try
|
||||||
if (chatcolour.Length == 3)
|
|
||||||
{
|
{
|
||||||
byte.TryParse(chatcolour[0], out group.R);
|
String[] chatcolour = reader.Get<String>("ChatColor").Split(',');
|
||||||
byte.TryParse(chatcolour[1], out group.G);
|
if (chatcolour.Length == 3)
|
||||||
byte.TryParse(chatcolour[2], out group.B);
|
{
|
||||||
|
byte.TryParse(chatcolour[0], out group.R);
|
||||||
|
byte.TryParse(chatcolour[1], out group.G);
|
||||||
|
byte.TryParse(chatcolour[2], out group.B);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
catch { }
|
||||||
groups.Add(group);
|
groups.Add(group);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue