Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit 0f5b839

Browse files
committed
update
1 parent 60a19ba commit 0f5b839

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

ASFOAuth/ASFOAuth.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ public Task OnLoaded()
159159
"OAUTH" or
160160
"OA" when argLength == 2 && access >= EAccess.Master =>
161161
Core.Command.OAuth(bot, args[1]),
162-
163-
"OPENID" or
162+
163+
"OPENID" or
164164
"OP" when argLength == 3 && access >= EAccess.Master =>
165165
Core.Command.OpenId(args[1], args[2]),
166166

ASFOAuth/Core/Command.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ internal static class Command
2020
var bot = Bot.GetBot(botName);
2121
if (bot == null)
2222
{
23-
return Utils.FormatStaticResponse(string.Format(Strings.BotNotFound, botName));
23+
return FormatStaticResponse(string.Format(Strings.BotNotFound, botName));
2424
}
2525
return await OAuth(bot, url).ConfigureAwait(false);
2626
}
27-
27+
2828
internal static async Task<string?> OpenId(Bot bot, string url)
2929
{
3030
if (!bot.IsConnectedAndLoggedOn)
@@ -40,7 +40,7 @@ internal static class Command
4040
var bot = Bot.GetBot(botName);
4141
if (bot == null)
4242
{
43-
return Utils.FormatStaticResponse(string.Format(Strings.BotNotFound, botName));
43+
return FormatStaticResponse(string.Format(Strings.BotNotFound, botName));
4444
}
4545
return await OpenId(bot, url).ConfigureAwait(false);
4646
}

ASFOAuth/Core/WebRequest.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal static partial class WebRequest
88
{
99
[GeneratedRegex(@"(?:(openid\.[a-z_.]+)=([^&]+))")]
1010
private static partial Regex OpenIdMatchQueries();
11-
11+
1212
[GeneratedRegex(@"(?:([a-z_.]+)=([^&]+))")]
1313
private static partial Regex OAuthMatchQueries();
1414

@@ -59,8 +59,8 @@ internal static async Task<string> LoginViaSteamOpenId(Bot bot, string url)
5959
var response2 = await bot.ArchiWebHandler.UrlPostToHtmlDocumentWithSession(request, data: formData, requestOptions: WebBrowser.ERequestOptions.ReturnRedirections).ConfigureAwait(false);
6060

6161
return response2?.FinalUri.ToString() ?? "登录失败";
62-
}
63-
62+
}
63+
6464
/// <summary>
6565
/// Steam OAuth登录
6666
/// </summary>
@@ -69,7 +69,7 @@ internal static async Task<string> LoginViaSteamOpenId(Bot bot, string url)
6969
/// <returns></returns>
7070
internal static async Task<string> LoginViaSteamOAuth(Bot bot, string url)
7171
{
72-
72+
7373
var regex = OAuthMatchQueries();
7474
var matches = regex.Matches(url);
7575

@@ -91,7 +91,7 @@ internal static async Task<string> LoginViaSteamOAuth(Bot bot, string url)
9191
{
9292
return "网络错误或OAuth链接无效";
9393
}
94-
94+
9595
var formData = new Dictionary<string, string>();
9696
foreach (var ele in eles)
9797
{
@@ -107,10 +107,10 @@ internal static async Task<string> LoginViaSteamOAuth(Bot bot, string url)
107107
{
108108
return "网络错误或OAuth链接无效";
109109
}
110-
110+
111111
request = new Uri(SteamCommunityURL, "/oauth/auth");
112112
var response2 = await bot.ArchiWebHandler.UrlPostToHtmlDocumentWithSession(request, data: formData, requestOptions: WebBrowser.ERequestOptions.ReturnRedirections).ConfigureAwait(false);
113-
113+
114114
return response2?.FinalUri.ToString() ?? "登录失败";
115115
}
116116
}

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>1.3.0.1</Version>
3+
<Version>1.4.0.0</Version>
44
</PropertyGroup>
55

66
<PropertyGroup>

0 commit comments

Comments
 (0)