This commit is contained in:
JacobTech 2024-11-18 23:23:48 -05:00
parent fae28490cd
commit 673e1bc4a8
12 changed files with 32 additions and 97 deletions

View File

@ -10,8 +10,6 @@ public static class Categories
{ {
public static TableColumn<CategoryRow, long> ID { get; } = new("id", true); public static TableColumn<CategoryRow, long> ID { get; } = new("id", true);
public static TableColumn<CategoryRow, byte[]> Name { get; } = new("name") { DefaultValue = Encoding.UTF8.GetBytes("New Category") }; public static TableColumn<CategoryRow, byte[]> Name { get; } = new("name") { DefaultValue = Encoding.UTF8.GetBytes("New Category") };
public static TableColumn<CategoryRow, ColorType> ColorType { get; } = new("color_type") { DefaultValue = Luski.Shared.PublicServers.V1.Enums.ColorType.Full};
public static TableColumn<CategoryRow, byte[]> Color { get; } = new("color") { DefaultValue = new byte[]{255,255,255,255} };
public static TableColumn<CategoryRow, byte[]> Description { get; } = new("description") { DefaultValue = Encoding.UTF8.GetBytes("Description") }; public static TableColumn<CategoryRow, byte[]> Description { get; } = new("description") { DefaultValue = Encoding.UTF8.GetBytes("Description") };
public static TableColumn<CategoryRow, long> TitleEncryptionKey { get; } = new("title_encryption_key") public static TableColumn<CategoryRow, long> TitleEncryptionKey { get; } = new("title_encryption_key")
{ {

View File

@ -20,8 +20,6 @@ public static class Channels
Column = Categories.ID Column = Categories.ID
} }
}; };
public static TableColumn<ChannelRow, ColorType> ColorType { get; } = new("color_type") { DefaultValue = Luski.Shared.PublicServers.V1.Enums.ColorType.Full};
public static TableColumn<ChannelRow, byte[]> Color { get; } = new("color") {DefaultValue = new byte[]{255,255,255,255} };
public static TableColumn<ChannelRow, ChannelType> Type { get; } = new("type"); public static TableColumn<ChannelRow, ChannelType> Type { get; } = new("type");
public static TableColumn<ChannelRow, DateTime> Epoch { get; } = new("epoch"); public static TableColumn<ChannelRow, DateTime> Epoch { get; } = new("epoch");
public static TableColumn<ChannelRow, byte[]> Name { get; } = new("name") { DefaultValue = Encoding.UTF8.GetBytes("New Channel") }; public static TableColumn<ChannelRow, byte[]> Name { get; } = new("name") { DefaultValue = Encoding.UTF8.GetBytes("New Channel") };

View File

@ -1,22 +0,0 @@
using Luski.Shared.PublicServers.V1.Enums;
using ServerDatabase;
using ServerDatabase.SourceGenerator;
namespace LuskiServer.Classes.TableDef;
public static class ProfileColors
{
public static TableColumn<ProfileColorRow, long> Profile { get; } = new("id", true)
{
ForeignKey = new ForeignKey()
{
Table = Tables.Profiles,
Column = Profiles.ID
}
};
public static TableColumn<ProfileColorRow, ColorType> ColorType { get; } = new("color_type") { DefaultValue = Luski.Shared.PublicServers.V1.Enums.ColorType.Full};
public static TableColumn<ProfileColorRow, byte[]> Color { get; } = new("color") { DefaultValue = new byte[]{255,255,255,255}};
}
[TableRow(typeof(ProfileColors))]
public partial class ProfileColorRow;

View File

@ -1,9 +1,6 @@
using Luski.Shared.PublicServers.V1.Enums; using Luski.Shared.PublicServers.V1.Enums;
using LuskiServer.Enums;
using ServerDatabase; using ServerDatabase;
using ServerDatabase.SourceGenerator; using ServerDatabase.SourceGenerator;
using ServerDatabase.Utils;
using ServerDatabase.Utils.Enums;
namespace LuskiServer.Classes.TableDef; namespace LuskiServer.Classes.TableDef;

View File

@ -23,7 +23,6 @@ public static class Tables
public static Table<MessageFileRow> MessageFiles { get; } = new("message_files", null!); public static Table<MessageFileRow> MessageFiles { get; } = new("message_files", null!);
public static Table<MessageRow> Messages { get; } = new("messages", null!); public static Table<MessageRow> Messages { get; } = new("messages", null!);
public static Table<OfflineDataRow> OfflineData { get; } = new("offline_data", null!); public static Table<OfflineDataRow> OfflineData { get; } = new("offline_data", null!);
public static Table<ProfileColorRow> ProfileColors { get; } = new("profile_colors", null!);
public static Table<ProfileControllerRow> ProfileControllers { get; } = new("profile_controllers", null!); public static Table<ProfileControllerRow> ProfileControllers { get; } = new("profile_controllers", null!);
public static Table<ProfileRoleControllerRow> ProfileRoleControllers { get; } = new("profiles_role_controllers", null!); public static Table<ProfileRoleControllerRow> ProfileRoleControllers { get; } = new("profiles_role_controllers", null!);
public static Table<ProfileRow> Profiles { get; } = new("profiles", null!); public static Table<ProfileRow> Profiles { get; } = new("profiles", null!);

View File

@ -26,7 +26,6 @@ public class SocketCategoryController : ControllerBase
epoch = DateTime.UtcNow.Date; epoch = DateTime.UtcNow.Date;
LuskiFunctions.Snowflake chanSnowflake = LuskiFunctions.Snowflake.GenerateSnowflake(epoch); LuskiFunctions.Snowflake chanSnowflake = LuskiFunctions.Snowflake.GenerateSnowflake(epoch);
Tables.Categories.Insert( Tables.Categories.Insert(
Categories.ColorType.CreateParameter(ChanReq.ColorType),
Categories.ID.CreateParameter(chanSnowflake.ID), Categories.ID.CreateParameter(chanSnowflake.ID),
Categories.Name.CreateParameter(Convert.FromBase64String(ChanReq.Name)), Categories.Name.CreateParameter(Convert.FromBase64String(ChanReq.Name)),
Categories.Description.CreateParameter(Convert.FromBase64String(ChanReq.Description)), Categories.Description.CreateParameter(Convert.FromBase64String(ChanReq.Description)),
@ -111,9 +110,7 @@ public class SocketCategoryController : ControllerBase
TitleEncoderType = chan.TitleEncoderType, TitleEncoderType = chan.TitleEncoderType,
DescriptionEncoderType = chan.DescriptionEncoderType, DescriptionEncoderType = chan.DescriptionEncoderType,
UserOverrides = UO.ToArray(), UserOverrides = UO.ToArray(),
RoleOverrides = RO.ToArray(), RoleOverrides = RO.ToArray()
ColorType = chan.ColorType,
Color = Convert.ToHexString(chan.Color)
}); });
} }
catch (Exception e) catch (Exception e)
@ -219,9 +216,7 @@ public class SocketCategoryController : ControllerBase
TitleEncoderType = chan.TitleEncoderType, TitleEncoderType = chan.TitleEncoderType,
DescriptionEncoderType = chan.DescriptionEncoderType, DescriptionEncoderType = chan.DescriptionEncoderType,
UserOverrides = UO.ToArray(), UserOverrides = UO.ToArray(),
RoleOverrides = RO.ToArray(), RoleOverrides = RO.ToArray()
ColorType = chan.ColorType,
Color = Convert.ToHexString(chan.Color)
}); });
} }
catch (Exception e) catch (Exception e)
@ -318,9 +313,7 @@ public class SocketCategoryController : ControllerBase
TitleEncoderType = chan.TitleEncoderType, TitleEncoderType = chan.TitleEncoderType,
DescriptionEncoderType = chan.DescriptionEncoderType, DescriptionEncoderType = chan.DescriptionEncoderType,
UserOverrides = UO.ToArray(), UserOverrides = UO.ToArray(),
RoleOverrides = RO.ToArray(), RoleOverrides = RO.ToArray()
ColorType = chan.ColorType,
Color = Convert.ToHexString(chan.Color)
}); });
} }
catch (Exception e) catch (Exception e)

View File

@ -29,8 +29,6 @@ public class SocketChannelController : ControllerBase
Tables.Channels.Insert( Tables.Channels.Insert(
Channels.ID.CreateParameter(chanSnowflake.ID), Channels.ID.CreateParameter(chanSnowflake.ID),
Channels.Parent.CreateParameter(ChanReq.Parent), Channels.Parent.CreateParameter(ChanReq.Parent),
Channels.ColorType.CreateParameter(ChanReq.ColorType),
Channels.Color.CreateParameter(Convert.FromHexString(ChanReq.Color)),
Channels.Type.CreateParameter(ChanReq.Type), Channels.Type.CreateParameter(ChanReq.Type),
Channels.Epoch.CreateParameter(epoch.Date), Channels.Epoch.CreateParameter(epoch.Date),
Channels.Name.CreateParameter(Convert.FromBase64String(ChanReq.Name)), Channels.Name.CreateParameter(Convert.FromBase64String(ChanReq.Name)),
@ -111,9 +109,7 @@ public class SocketChannelController : ControllerBase
EncoderTypes = chan.EncoderTypes, EncoderTypes = chan.EncoderTypes,
UserOverrides = UO.ToArray(), UserOverrides = UO.ToArray(),
RoleOverrides = RO.ToArray(), RoleOverrides = RO.ToArray(),
PictureType = chan.PictureType, PictureType = chan.PictureType
ColorType = chan.ColorType,
Color = Convert.ToHexString(chan.Color)
}); });
} }
catch (Exception e) catch (Exception e)
@ -220,9 +216,7 @@ public class SocketChannelController : ControllerBase
EncoderTypes = chan.EncoderTypes, EncoderTypes = chan.EncoderTypes,
UserOverrides = UO.ToArray(), UserOverrides = UO.ToArray(),
RoleOverrides = RO.ToArray(), RoleOverrides = RO.ToArray(),
PictureType = chan.PictureType, PictureType = chan.PictureType
ColorType = chan.ColorType,
Color = Convert.ToHexString(chan.Color)
}); });
} }
catch (Exception e) catch (Exception e)

View File

@ -58,22 +58,12 @@ public class SocketProfileController : ControllerBase
{ {
if (!this.CanTokenRequest(out long ID, out long SID, out IActionResult? toc) && toc != null) return toc; if (!this.CanTokenRequest(out long ID, out long SID, out IActionResult? toc) && toc != null) return toc;
if (!Tables.Profiles.TryReadRow(out ProfileRow PR, Profiles.ID.CreateParameter(Person))) return this.ShowError(ErrorCode.Forbidden, "Profile does not exist"); if (!Tables.Profiles.TryReadRow(out ProfileRow PR, Profiles.ID.CreateParameter(Person))) return this.ShowError(ErrorCode.Forbidden, "Profile does not exist");
string? color = null;
ColorType? ct = null;
if (Tables.ProfileColors.TryReadRow(out var b,
ProfileColors.Profile.CreateParameter(PR.ID)))
{
color = Convert.ToHexString(b.Color);
ct = b.ColorType;
}
return this.ResponseToResult(new ProfileSTC() return this.ResponseToResult(new ProfileSTC()
{ {
ID = PR.ID, ID = PR.ID,
DisplayName = PR.DisplayName, DisplayName = PR.DisplayName,
PictureType = PR.PictureType, PictureType = PR.PictureType,
Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(Person)), Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(Person)),
ColorType = ct,
Color = color,
RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(Person)), RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(Person)),
Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(Person)), Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(Person)),
Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(Person)), Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(Person)),
@ -100,22 +90,12 @@ public class SocketProfileController : ControllerBase
{ {
foreach (ProfileRow PR in PcRs) foreach (ProfileRow PR in PcRs)
{ {
string? color = null;
ColorType? ct = null;
if (Tables.ProfileColors.TryReadRow(out ProfileColorRow b,
ProfileColors.Profile.CreateParameter(PR.ID)))
{
color = Convert.ToHexString(b.Color);
ct = b.ColorType;
}
Vals.Add(PR.ID, new() Vals.Add(PR.ID, new()
{ {
ID = PR.ID, ID = PR.ID,
DisplayName = PR.DisplayName, DisplayName = PR.DisplayName,
PictureType = PR.PictureType, PictureType = PR.PictureType,
Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(PR.ID)), Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(PR.ID)),
ColorType = ct,
Color = color,
RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(PR.ID)), RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(PR.ID)),
Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(PR.ID)), Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(PR.ID)),
Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(PR.ID)), Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(PR.ID)),
@ -132,22 +112,12 @@ public class SocketProfileController : ControllerBase
{ {
if (!Vals.ContainsKey(PR.ID)) if (!Vals.ContainsKey(PR.ID))
{ {
string? color = null;
ColorType? ct = null;
if (Tables.ProfileColors.TryReadRow(out var b,
ProfileColors.Profile.CreateParameter(PR.ID)))
{
color = Convert.ToHexString(b.Color);
ct = b.ColorType;
}
Vals.Add(PR.ID, new() Vals.Add(PR.ID, new()
{ {
ID = PR.ID, ID = PR.ID,
DisplayName = PR.DisplayName, DisplayName = PR.DisplayName,
PictureType = PR.PictureType, PictureType = PR.PictureType,
Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(PR.ID)), Controllers = Tables.ProfileControllers.ReadColumn(ProfileControllers.User, ProfileControllers.Profile.CreateParameter(PR.ID)),
ColorType = ct,
Color = color,
RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(PR.ID)), RoleControllers = Tables.ProfileRoleControllers.ReadColumn(ProfileRoleControllers.Role, ProfileRoleControllers.Profile.CreateParameter(PR.ID)),
Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(PR.ID)), Channels = Tables.ChannelProfiles.ReadColumn(ChannelProfiles.Channel, ChannelProfiles.Profile.CreateParameter(PR.ID)),
Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(PR.ID)), Categories = Tables.CategoryProfiles.ReadColumn(CategoryProfiles.Category, CategoryProfiles.Profile.CreateParameter(PR.ID)),

View File

@ -2,7 +2,6 @@ using Asp.Versioning;
using Luski.Shared.PublicServers.V1.ClientToServer.HTTP; using Luski.Shared.PublicServers.V1.ClientToServer.HTTP;
using Luski.Shared.PublicServers.V1.Enums; using Luski.Shared.PublicServers.V1.Enums;
using Luski.Shared.PublicServers.V1.ServerToClient.HTTP; using Luski.Shared.PublicServers.V1.ServerToClient.HTTP;
using Luski.Shared.PublicServers.V1.ServerToClient.WSS;
using Luski.Shared.PublicServers.V1.Shared; using Luski.Shared.PublicServers.V1.Shared;
using LuskiServer.Classes; using LuskiServer.Classes;
using LuskiServer.Classes.ServerComs; using LuskiServer.Classes.ServerComs;

View File

@ -10,9 +10,23 @@ namespace LuskiServer.Converters.Matrix;
public static class Matrix public static class Matrix
{ {
/// <summary>
///
/// </summary>
/// <param name="Zip">File Stream</param>
/// <param name="Channel">Luski Channel ID</param>
/// <param name="defaultuser">ID of user doing the conversion</param>
/// <param name="UserMap">Map of matrix name to luski account</param>
/// <param name="ProfilesIdList">Map of matrix name to Luski Profile</param>
/// <param name="Profiles">Map of matrix names to new Luski Profiles</param>
/// <param name="IgnoredUsers">List of ignored matrix names</param>
/// <param name="Encoder">The Encoding to use for Luski Messages</param>
/// <param name="Encryption">The Encryption key to use for Luski Messages</param>
/// <param name="remove">Removes channel if same id is already created</param>
/// <exception cref="Exception"></exception>
public static void ZipJsonChatExport(Stream Zip, long Channel, long defaultuser, Dictionary<string, long> UserMap, public static void ZipJsonChatExport(Stream Zip, long Channel, long defaultuser, Dictionary<string, long> UserMap,
Dictionary<string, int> ChannelProfilesIdList, Dictionary<string, int> ProfilesIdList,
List<Tuple<string, byte[], PictureType, byte[]>> Profiles, List<Tuple<string, byte[], PictureType>> Profiles,
List<string> IgnoredUsers, EncoderType Encoder, long Encryption, bool remove = true) List<string> IgnoredUsers, EncoderType Encoder, long Encryption, bool remove = true)
{ {
Dictionary<int, long> IdConverter = new(); Dictionary<int, long> IdConverter = new();
@ -30,21 +44,18 @@ public static class Matrix
void checkFakeUser(string id) void checkFakeUser(string id)
{ {
if (!IdConverter.ContainsKey(ChannelProfilesIdList[id])) if (!IdConverter.ContainsKey(ProfilesIdList[id]))
{ {
long id2 = LuskiFunctions.Snowflake.GenerateSnowflake().ID; long id2 = LuskiFunctions.Snowflake.GenerateSnowflake().ID;
Tables.Profiles.Insert( Tables.Profiles.Insert(
Classes.TableDef.Profiles.ID.CreateParameter(id2), Classes.TableDef.Profiles.ID.CreateParameter(id2),
Classes.TableDef.Profiles.PictureType.CreateParameter(Profiles[ChannelProfilesIdList[id]].Item3), Classes.TableDef.Profiles.PictureType.CreateParameter(Profiles[ProfilesIdList[id]].Item3),
Classes.TableDef.Profiles.Picture.CreateParameter(Profiles[ChannelProfilesIdList[id]].Item2), Classes.TableDef.Profiles.Picture.CreateParameter(Profiles[ProfilesIdList[id]].Item2),
Classes.TableDef.Profiles.DisplayName.CreateParameter(Profiles[ChannelProfilesIdList[id]].Item1)); Classes.TableDef.Profiles.DisplayName.CreateParameter(Profiles[ProfilesIdList[id]].Item1));
Tables.ProfileColors.Insert( IdConverter.Add(ProfilesIdList[id], id2);
ProfileColors.Profile.CreateParameter(id2),
ProfileColors.Color.CreateParameter(Profiles[ChannelProfilesIdList[id]].Item4));
IdConverter.Add(ChannelProfilesIdList[id], id2);
Tables.ChannelProfiles.Insert(ChannelProfiles.Channel.CreateParameter(Channel), ChannelProfiles.Profile.CreateParameter(id2)); Tables.ChannelProfiles.Insert(ChannelProfiles.Channel.CreateParameter(Channel), ChannelProfiles.Profile.CreateParameter(id2));
foreach (KeyValuePair<string, int> v in ChannelProfilesIdList.Where(s => s.Value == ChannelProfilesIdList[id])) foreach (KeyValuePair<string, int> v in ProfilesIdList.Where(s => s.Value == ProfilesIdList[id]))
{ {
cps.Add(v.Key, id2); cps.Add(v.Key, id2);
} }
@ -78,7 +89,7 @@ public static class Matrix
Console.WriteLine(inow + " of " + imax); Console.WriteLine(inow + " of " + imax);
if (msg.Type != "m.room.message") if (msg.Type != "m.room.message")
continue; continue;
if (!UserMap.ContainsKey(msg.Sender) && !ChannelProfilesIdList.ContainsKey(msg.Sender)) if (!UserMap.ContainsKey(msg.Sender) && !ProfilesIdList.ContainsKey(msg.Sender))
{ {
if (IgnoredUsers.Contains(msg.Sender)) if (IgnoredUsers.Contains(msg.Sender))
continue; continue;
@ -102,10 +113,10 @@ public static class Matrix
cur = cur.ToLocalTime(); cur = cur.ToLocalTime();
long id; long id;
long profile = 0; long profile = 0;
if (ChannelProfilesIdList.ContainsKey(msg.Sender)) if (ProfilesIdList.ContainsKey(msg.Sender))
{ {
checkFakeUser(msg.Sender); checkFakeUser(msg.Sender);
profile = IdConverter[ChannelProfilesIdList[msg.Sender]]; profile = IdConverter[ProfilesIdList[msg.Sender]];
id = defaultuser; id = defaultuser;
} }
else else

View File

@ -5,7 +5,7 @@
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<IncludeBuildOutput>true</IncludeBuildOutput> <IncludeBuildOutput>true</IncludeBuildOutput>
<FileVersion>1.0.0.0</FileVersion> <FileVersion>1.0.0.1</FileVersion>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
@ -22,7 +22,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.0.0" /> <PackageReference Include="Asp.Versioning.Mvc.ApiExplorer" Version="7.0.0" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.12" /> <PackageReference Include="BenchmarkDotNet" Version="0.13.12" />
<PackageReference Include="Luski.Shared" Version="1.1.0-alpha43" /> <PackageReference Include="Luski.Shared" Version="1.1.0-alpha48" />
<PackageReference Include="Markdig" Version="0.36.2" /> <PackageReference Include="Markdig" Version="0.36.2" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.3" /> <PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.3" />
<PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" /> <PackageReference Include="Microsoft.Extensions.PlatformAbstractions" Version="1.1.0" />

View File

@ -76,7 +76,6 @@ if (!Tables.Profiles.TryRead(Profiles.ID, out _, Profiles.ID.CreateParameter(0))
Profiles.DisplayName.CreateParameter("Server"), Profiles.DisplayName.CreateParameter("Server"),
Profiles.PictureType.CreateParameter(PictureType.none), Profiles.PictureType.CreateParameter(PictureType.none),
Profiles.Picture.CreateParameter(Array.Empty<byte>())); Profiles.Picture.CreateParameter(Array.Empty<byte>()));
Tables.ProfileColors.Insert(ProfileColors.Profile.CreateParameter(0), ProfileColors.Color.CreateParameter((new byte[] {255,255,255,255})));
} }
if (!LuskiFunctions.Database.VersionsTable.TryRead(LuskiFunctions.Database.VersionsTable.ID, out _, if (!LuskiFunctions.Database.VersionsTable.TryRead(LuskiFunctions.Database.VersionsTable.ID, out _,
@ -143,7 +142,6 @@ if (!Tables.Roles.TryRead(Roles.ID, out _, Roles.ID.CreateParameter(0)))
Tables.Roles.Insert( Tables.Roles.Insert(
Roles.ID.CreateParameter(0), Roles.ID.CreateParameter(0),
Roles.DisplayName.CreateParameter("Members"), Roles.DisplayName.CreateParameter("Members"),
Roles.Color.CreateDefaultParameter(),
Roles.Description.CreateParameter("The default role for the server. Everybody will have this role."), Roles.Description.CreateParameter("The default role for the server. Everybody will have this role."),
Roles.ServerPermissions.CreateParameter( Roles.ServerPermissions.CreateParameter(
ServerPermission.ViewChannels | ServerPermission.ViewChannels |