mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Reject clan invites when IsBotAccount
Also make it possible for quite rare situation of ASF accepting invite to SteamMasterClanID if it couldn't join due to group being non-public
This commit is contained in:
@@ -29,6 +29,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using ArchiSteamFarm.CMsgs;
|
||||
using SteamKit2;
|
||||
using SteamKit2.Internal;
|
||||
|
||||
@@ -212,6 +213,24 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
}
|
||||
|
||||
internal void AcceptClanInvite(ulong clanID, bool accept) {
|
||||
if (clanID == 0) {
|
||||
ArchiLogger.LogNullError(nameof(clanID));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Client.IsConnected) {
|
||||
return;
|
||||
}
|
||||
|
||||
ClientMsg<CMsgClientClanInviteAction> request = new ClientMsg<CMsgClientClanInviteAction>();
|
||||
|
||||
request.Body.ClanID = clanID;
|
||||
request.Body.AcceptInvite = accept;
|
||||
|
||||
Client.Send(request);
|
||||
}
|
||||
|
||||
private void HandleFSOfflineMessageNotification(IPacketMsg packetMsg) {
|
||||
if (packetMsg == null) {
|
||||
ArchiLogger.LogNullError(nameof(packetMsg));
|
||||
|
||||
Reference in New Issue
Block a user