Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 3 additions & 16 deletions src/NosCore.Core/AuthorizeRoleAttribute.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using Microsoft.AspNetCore.Authorization;
using NosCore.Shared.Enumerations;
Expand All @@ -33,4 +20,4 @@ public AuthorizeRoleAttribute(AuthorityType allowedRole)
Roles = string.Join(",", enums.ToArray());
}
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Channel.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Shared.Configuration;
using NosCore.Shared.Enumerations;
Expand Down Expand Up @@ -46,4 +33,4 @@ public class Channel

public int ConnectedAccountLimit { get; set; }
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/ChannelInfo.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NodaTime;
using NosCore.Shared.Enumerations;
Expand All @@ -38,4 +25,4 @@ public class ChannelInfo
public bool IsMaintenance { get; set; }
public byte ServerId { get; set; }
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Configuration/LoginConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Packets.ClientPackets.Login;
using NosCore.Shared.Configuration;
Expand All @@ -35,4 +22,4 @@ public class LoginConfiguration : ServerConfiguration
public string? Md5String { get; set; }
public bool EnforceNewAuth { get; set; }
}
}
}
21 changes: 4 additions & 17 deletions src/NosCore.Core/Configuration/WorldConfiguration.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Data.Enumerations;
using NosCore.Shared.Configuration;
Expand Down Expand Up @@ -70,7 +57,7 @@ public class WorldConfiguration : ServerConfiguration
public Dictionary<string, List<BasicEquipment>> BasicEquipments { get; set; } = new();

public Dictionary<string, List<short>> BasicSkills { get; set; } = new();

#pragma warning restore CA2227 // Collection properties should be read only
}

Expand All @@ -82,4 +69,4 @@ public class BasicEquipment

public NoscorePocketType NoscorePocketType { get; set; }
}
}
}
17 changes: 2 additions & 15 deletions src/NosCore.Core/ConfigureJwtBearerOptions.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.Extensions.Options;
Expand Down
19 changes: 3 additions & 16 deletions src/NosCore.Core/ConnectionInfo.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

namespace NosCore.Core
{
Expand All @@ -24,4 +11,4 @@ public class ConnectionInfo
public string? Token { get; set; }
public Channel? ChannelInfo { get; set; }
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Encryption/BcryptEncryption.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Shared.Authentication;
using System;
Expand All @@ -31,4 +18,4 @@ public string Hash(string password, string? salt)

public string Hash(string password) => throw new NotImplementedException();
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Encryption/Pbkdf2Hasher.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Shared.Authentication;
using System;
Expand Down Expand Up @@ -43,4 +30,4 @@ public string Hash(string inputString, string? salt)

public string Hash(string password) => throw new NotImplementedException();
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Encryption/Sha512Hasher.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using NosCore.Shared.Authentication;
using System.Globalization;
Expand All @@ -36,4 +23,4 @@ public string Hash(string password, string? salt)

public string Hash(string password) => Hash(password, null);
}
}
}
19 changes: 3 additions & 16 deletions src/NosCore.Core/Extensions/TypeExtension.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,8 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using System;
using System.Collections.Concurrent;
Expand Down Expand Up @@ -91,4 +78,4 @@ public static T CreateInstance<T>(this Type type)
return (T)constructor();
}
}
}
}
25 changes: 6 additions & 19 deletions src/NosCore.Core/I18N/GameLanguageLocalizer.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,15 @@
// __ _ __ __ ___ __ ___ ___
// __ _ __ __ ___ __ ___ ___
// | \| |/__\ /' _/ / _//__\| _ \ __|
// | | ' | \/ |`._`.| \_| \/ | v / _|
// |_|\__|\__/ |___/ \__/\__/|_|_\___|
//
// Copyright (C) 2019 - NosCore
//
// NosCore is a free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//

using System.Collections.Generic;
using Microsoft.Extensions.Localization;
using NosCore.Data.Enumerations.I18N;
using NosCore.Shared.Enumerations;
using System.Globalization;
using Microsoft.Extensions.Localization;
using NosCore.Shared.I18N;
using System.Collections.Generic;
using System.Globalization;

namespace NosCore.Core.I18N
{
Expand Down Expand Up @@ -64,4 +51,4 @@ public class GameLanguageLocalizer(ILogLanguageLocalizer<LanguageKey> stringLoca

public IEnumerable<LocalizedString> GetAllStrings() => stringLocalizer.GetAllStrings();
}
}
}
Loading
Loading