Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
1.5.0
Browse files Browse the repository at this point in the history
1. Обновление под ядро
2. Версии теперь берутся из `AssemblyVersion`
  • Loading branch information
likhner committed Oct 21, 2022
1 parent ba10303 commit 65ff3e7
Show file tree
Hide file tree
Showing 13 changed files with 33 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "1.4.0"
release_name: "1.4.0"
tag_name: "1.5.0"
release_name: "1.5.0"

- name: Upload Linux build to GitHub release
uses: actions/upload-release-asset@v1
Expand Down
2 changes: 1 addition & 1 deletion Configs/ConfigDialog.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics;
using nng_one.Logging;
using nng_one.Input;

namespace nng_one.Configs;

Expand Down
9 changes: 5 additions & 4 deletions Functions/BanCompare.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using nng_one.FunctionParameters;
using nng_one.Logging;
using nng_one.Input;
using nng_one.ServiceCollections;
using nng.Constants;
using nng.Enums;
using nng.Helpers;
using nng.Logging;
Expand Down Expand Up @@ -107,7 +108,7 @@ private static void ProcessUsersUnban(long group, IEnumerable<long> users)

private static void BanUser(long user, long group, string banReason)
{
VkFramework.CaptchaSecondsToWait = 10;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaBlockWaitTime;
try
{
VkFramework.Block(group, user, banReason);
Expand All @@ -123,7 +124,7 @@ private static void BanUser(long user, long group, string banReason)

private static void FireEditor(long user, long group)
{
VkFramework.CaptchaSecondsToWait = 3600;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaEditorWaitTime;
try
{
VkFramework.EditManager(user, group, null);
Expand All @@ -138,7 +139,7 @@ private static void FireEditor(long user, long group)

private static void UnblockUser(long user, long group)
{
VkFramework.CaptchaSecondsToWait = 10;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaBlockWaitTime;
try
{
VkFramework.UnBlock(group, user);
Expand Down
5 changes: 3 additions & 2 deletions Functions/Block.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using nng_one.Configs;
using nng_one.FunctionParameters;
using nng_one.ServiceCollections;
using nng.Constants;
using nng.Enums;
using nng.Helpers;
using nng.Logging;
Expand Down Expand Up @@ -53,7 +54,7 @@ public static void Process(BlockParameters blockParameters)

private static void BanUser(long user, long group, Config config)
{
VkFramework.CaptchaSecondsToWait = 10;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaBlockWaitTime;
try
{
VkFramework.Block(group, user, config.BanReason);
Expand All @@ -69,7 +70,7 @@ private static void BanUser(long user, long group, Config config)

private static void FireEditor(long user, long group)
{
VkFramework.CaptchaSecondsToWait = 3600;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaEditorWaitTime;
try
{
VkFramework.EditManager(user, group, null);
Expand Down
5 changes: 3 additions & 2 deletions Functions/Editor.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using nng_one.Extensions;
using nng_one.FunctionParameters;
using nng_one.ServiceCollections;
using nng.Constants;
using nng.Enums;
using nng.Helpers;
using nng.Logging;
Expand Down Expand Up @@ -88,7 +89,7 @@ private static void ProcessEditorWithGroupMembers(long group, EditorOperationTyp

private static void GiveEditor(long group, long user)
{
VkFramework.CaptchaSecondsToWait = 3600;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaEditorWaitTime;
try
{
VkFramework.EditManager(user, group, ManagerRole.Editor);
Expand All @@ -103,7 +104,7 @@ private static void GiveEditor(long group, long user)

private static void FireEditor(long group, long editor)
{
VkFramework.CaptchaSecondsToWait = 3600;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaEditorWaitTime;
try
{
VkFramework.EditManager(editor, group, null);
Expand Down
3 changes: 2 additions & 1 deletion Functions/Misc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
using VkNet.Model.RequestParams.Stories;
using VkNet.Utils;
using CaptchaHandler = nng_one.Helpers.CaptchaHandler;
using Constants = nng.Constants.Constants;

namespace nng_one.Functions;

Expand Down Expand Up @@ -196,7 +197,7 @@ private static void ProcessDeleteDogs(IEnumerable<Group> groups)

private static void DeleteDog(long group, long user)
{
VkFramework.CaptchaSecondsToWait = 3600;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaEditorWaitTime;
try
{
VkFramework.EditManager(user, group, null);
Expand Down
3 changes: 2 additions & 1 deletion Functions/Unblock.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using nng_one.FunctionParameters;
using nng_one.ServiceCollections;
using nng.Constants;
using nng.Enums;
using nng.Helpers;
using nng.Logging;
Expand Down Expand Up @@ -65,7 +66,7 @@ private static void UnblockUsers(long group, IEnumerable<long> users)

private static void UnblockUser(long group, long user)
{
VkFramework.CaptchaSecondsToWait = 10;
VkFramework.CaptchaSecondsToWait = Constants.CaptchaBlockWaitTime;
try
{
VkFramework.UnBlock(group, user);
Expand Down
2 changes: 1 addition & 1 deletion Helpers/CaptchaHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using System.Diagnostics;
using nng_one.Logging;
using nng_one.Input;
using nng_one.ServiceCollections;
using nng.Enums;
using nng.Logging;
Expand Down
2 changes: 1 addition & 1 deletion Logging/InputHandler.cs → Input/InputHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using nng.Enums;
using nng.Logging;

namespace nng_one.Logging;
namespace nng_one.Input;

public class InputHandler
{
Expand Down
2 changes: 1 addition & 1 deletion Logging/VKUserInput.cs → Input/VKUserInput.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using nng.VkFrameworks;
using VkNet.Model;

namespace nng_one.Logging;
namespace nng_one.Input;

public static class VkUserInput
{
Expand Down
6 changes: 3 additions & 3 deletions Menu/Menu.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using nng_one.Configs;
using nng_one.FunctionParameters;
using nng_one.Input;
using nng_one.Interfaces;
using nng_one.Logging;
using nng_one.ServiceCollections;
using nng.Logging;
using nng.Models;
Expand Down Expand Up @@ -33,7 +33,7 @@ public IFunctionParameter GetResult()
private IFunctionParameter Block()
{
if (_inputHandler.GetBoolInput("Начать блокировку пользователей в сообществах?"))
return new BlockParameters(_data.Users.Where(x => !x.Deleted.HasValue).Select(x => x.Id), _data.GroupList,
return new BlockParameters(_data.Users.Where(x => !x.Deleted).Select(x => x.Id), _data.GroupList,
_config);
_logger.Clear();
return GetResult();
Expand Down Expand Up @@ -139,7 +139,7 @@ private IFunctionParameter Search()
if (!_inputHandler.GetBoolInput("Вы уверены, что хотите посмотреть несостыковки?"))
return Search();
return new BanCompareParameters(_data.GroupList.ToList(), _data.Users
.Where(x => !x.Deleted.HasValue).Select(x => x.Id), _config);
.Where(x => !x.Deleted).Select(x => x.Id), _config);
default:
throw new ArgumentOutOfRangeException();
}
Expand Down
7 changes: 5 additions & 2 deletions Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Text;
using System.Reflection;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using nng_one.Configs;
using nng_one.Exceptions;
Expand All @@ -20,7 +21,9 @@ public static class CommandLineArguments

public static class Program
{
public static readonly Version Version = new(1, 4, 0);
public static readonly Version Version =
Assembly.GetExecutingAssembly().GetName().Version ?? throw new InvalidOperationException();

public static readonly List<Message> Messages = new();
public static readonly Logger Logger = new(new ProgramInformationService(Version, false), "nng one");
public static bool DebugMode { get; private set; }
Expand Down
6 changes: 4 additions & 2 deletions nng-one.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<DebugType>embedded</DebugType>
<AssemblyVersion>1.5.0</AssemblyVersion>
</PropertyGroup>

<PropertyGroup>
<PackageId>nng-one</PackageId>
<PackageVersion>1.4.0</PackageVersion>
<PackageVersion>1.5.0</PackageVersion>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Authors>likhner;RomanKochetov</Authors>
<RepositoryUrl>https://github.com/MrAlonas/nng-one.git</RepositoryUrl>
Expand All @@ -23,7 +24,7 @@

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1"/>
<PackageReference Include="nng" Version="1.4.1"/>
<PackageReference Include="nng" Version="1.5.0"/>
<PackageReference Include="Sentry" Version="3.22.0"/>
<PackageReference Include="VkNet" Version="1.72.0"/>
</ItemGroup>
Expand All @@ -33,4 +34,5 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

</Project>

0 comments on commit 65ff3e7

Please sign in to comment.