Compare commits

...

6 Commits

Author SHA1 Message Date
JustArchi
71de3c958a Rewrite previous commit in a better way
Also change sticky pause to owner permission
2017-03-25 18:07:23 +01:00
JustArchi
86acec9b32 Closes #512 2017-03-25 18:02:46 +01:00
JustArchi
133e0768c3 Bump 2017-03-24 21:46:16 +01:00
JustArchi
706474f66a Translations update 2017-03-24 21:45:48 +01:00
JustArchi
bd7f1388d7 Ensure MarkInventory() goes through trading limiter 2017-03-24 21:35:07 +01:00
JustArchi
b23a0383fe Bump 2017-03-23 21:47:33 +01:00
6 changed files with 36 additions and 25 deletions

View File

@@ -1189,6 +1189,15 @@ namespace ArchiSteamFarm {
}).Forget();
}
private async Task MarkInventoryIfNeeded() {
if (!BotConfig.DismissInventoryNotifications) {
return;
}
await Trading.LimitInventoryRequestsAsync().ConfigureAwait(false);
await ArchiWebHandler.MarkInventory().ConfigureAwait(false);
}
private async void OnAccountInfo(SteamUser.AccountInfoCallback callback) {
if (callback == null) {
ArchiLogger.LogNullError(nameof(callback));
@@ -1641,10 +1650,7 @@ namespace ArchiSteamFarm {
RequestPersonaStateUpdate();
InitializeFamilySharing().Forget();
if (BotConfig.DismissInventoryNotifications) {
ArchiWebHandler.MarkInventory().Forget();
}
MarkInventoryIfNeeded().Forget();
if (BotConfig.SteamMasterClanID != 0) {
Task.Run(async () => {
@@ -1755,9 +1761,7 @@ namespace ArchiSteamFarm {
switch (notification) {
case ArchiHandler.NotificationsCallback.ENotification.Items:
CardsFarmer.OnNewItemsNotification().Forget();
if (BotConfig.DismissInventoryNotifications) {
ArchiWebHandler.MarkInventory().Forget();
}
MarkInventoryIfNeeded().Forget();
break;
case ArchiHandler.NotificationsCallback.ENotification.Trading:
Trading.CheckTrades().Forget();
@@ -2564,12 +2568,11 @@ namespace ArchiSteamFarm {
return null;
}
BotConfig.EPermission permission = GetSteamUserPermission(steamID);
if (permission < BotConfig.EPermission.FamilySharing) {
if (!IsFamilySharing(steamID)) {
return null;
}
if (sticky && (permission < BotConfig.EPermission.Master)) {
if (sticky && !IsOperator(steamID)) {
return FormatBotResponse(Strings.ErrorAccessDenied);
}
@@ -2583,7 +2586,7 @@ namespace ArchiSteamFarm {
await CardsFarmer.Pause(sticky).ConfigureAwait(false);
if (permission >= BotConfig.EPermission.Master) {
if (IsOperator(steamID)) {
return FormatBotResponse(Strings.BotAutomaticIdlingNowPaused);
}

View File

@@ -374,7 +374,7 @@
<comment>{0} will be replaced by bot's name query (string)</comment>
</data>
<data name="BotStatusOverview" xml:space="preserve">
<value>Ci sono {0}/{1} bot in esecuzione, per un totale di {2} giochi ({3} carte) ancora da trovare.</value>
<value>Ci sono {0}/{1} bot in esecuzione, per un totale di {2} giochi ({3} carte) ancora da farmare.</value>
<comment>{0} will be replaced by number of active bots, {1} will be replaced by total number of bots, {2} will be replaced by total number of games left to idle, {3} will be replaced by total number of cards left to idle</comment>
</data>
<data name="BotStatusIdling" xml:space="preserve">
@@ -399,7 +399,7 @@
<value>Fatto!</value>
</data>
<data name="GamesToIdle" xml:space="preserve">
<value>Ci sono un totale di {0} giochi ({1} carte) ancora da trovare (~{2} rimanenti)...</value>
<value>Ci sono un totale di {0} giochi ({1} carte) ancora da farmare (~{2} rimanenti)...</value>
<comment>{0} will be replaced by number of games, {1} will be replaced by number of cards, {2} will be replaced by translated TimeSpan string built from TimeSpan* translation parts</comment>
</data>
<data name="IdlingFinished" xml:space="preserve">
@@ -424,7 +424,7 @@
<value>Questa richiesta verrà ignorata, in quanto è abilitata la pausa permanente!</value>
</data>
<data name="NothingToIdle" xml:space="preserve">
<value>Non c'è niente da trovare su questo account!</value>
<value>Non c'è niente da farmare su questo account!</value>
</data>
<data name="NowIdling" xml:space="preserve">
<value>Ora in idle: {0} ({1})</value>
@@ -546,7 +546,9 @@
<data name="BotLootingFailed" xml:space="preserve">
<value>Offerta di scambio fallita!</value>
</data>
<data name="BotLootingMasterNotDefined" xml:space="preserve">
<value>L'offerta di scambio non può essere inviata perchè non c'è nessun botmaster definito!</value>
</data>
<data name="BotLootingNoLootableTypes" xml:space="preserve">
<value>Non hai configurato il tipo di oggetti per il loot!</value>
</data>
@@ -603,7 +605,9 @@
<data name="BotStatusLimited" xml:space="preserve">
<value>Il Bot è un account limitato e non può ottenere carte tramite idling.</value>
</data>
<data name="BotStatusConnecting" xml:space="preserve">
<value>Il bot si stà connettendo alla rete di Steam.</value>
</data>
<data name="BotStatusNotRunning" xml:space="preserve">
<value>Bot non è in esecuzione.</value>
</data>
@@ -707,5 +711,7 @@
<value>Già posseduto: {0}</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
</data>
<data name="ErrorAccessDenied" xml:space="preserve">
<value>Accesso negato!</value>
</data>
</root>

View File

@@ -706,5 +706,7 @@
<value>所有している: {0}</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
</data>
<data name="ErrorAccessDenied" xml:space="preserve">
<value>アクセスが拒否されました!</value>
</data>
</root>

View File

@@ -477,7 +477,7 @@ StackTrace:
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by status string</comment>
</data>
<data name="BotAddLicenseWithItems" xml:space="preserve">
<value>ID: {0} | Status: {1} | Items: {2}</value>
<value>ID: {0} | Status: {1} | Geactiveerde ID(s): {2}</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by status string, {2} will be replaced by list of granted IDs (numbers), separated by a comma</comment>
</data>
<data name="BotAlreadyRunning" xml:space="preserve">
@@ -529,7 +529,7 @@ StackTrace:
<value>Deze bot wordt niet gestart omdat hij uitgeschakeld is in het configuratiebestand!</value>
</data>
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
<value>TwoFactorCodeMisMatch foutmelding {0} keer ontvangen. Dit betekent meestal de verkeerde ASF 2FA login informatie, afbreken!</value>
<value>TwoFactorCodeMisMatch foutmelding {0} keer op rij ontvangen. Dit betekent meestal de verkeerde ASF 2FA login informatie. Proces wordt afgebroken!</value>
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
</data>
<data name="BotLoggedOff" xml:space="preserve">
@@ -543,7 +543,7 @@ StackTrace:
<value>Inloggen...</value>
</data>
<data name="BotLogonSessionReplaced" xml:space="preserve">
<value>Dit account wordt waarschijnlijk al gebruikt door een andere ASF-instantie, wat wordt gezien als ongedefinieerd gedrag. Weigeren om het voort te zetten!</value>
<value>Dit account wordt waarschijnlijk al gebruikt door een andere ASF-instantie, wat wordt gezien als ongedefinieerd gedrag. Weigeren om het proces voort te zetten!</value>
</data>
<data name="BotLootingFailed" xml:space="preserve">
<value>Ruilaanbod mislukt!</value>

View File

@@ -477,7 +477,7 @@ StackTrace:
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by status string</comment>
</data>
<data name="BotAddLicenseWithItems" xml:space="preserve">
<value>ID: {0} | Status: {1} | Items: {2}</value>
<value>ID: {0} | Status: {1} | Geactiveerde ID(s): {2}</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by status string, {2} will be replaced by list of granted IDs (numbers), separated by a comma</comment>
</data>
<data name="BotAlreadyRunning" xml:space="preserve">
@@ -529,7 +529,7 @@ StackTrace:
<value>Deze bot wordt niet gestart omdat hij uitgeschakeld is in het configuratiebestand!</value>
</data>
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
<value>TwoFactorCodeMisMatch foutmelding {0} keer ontvangen. Dit betekent meestal de verkeerde ASF 2FA login informatie, afbreken!</value>
<value>TwoFactorCodeMisMatch foutmelding {0} keer op rij ontvangen. Dit betekent meestal de verkeerde ASF 2FA login informatie. Proces wordt afgebroken!</value>
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
</data>
<data name="BotLoggedOff" xml:space="preserve">
@@ -543,7 +543,7 @@ StackTrace:
<value>Inloggen...</value>
</data>
<data name="BotLogonSessionReplaced" xml:space="preserve">
<value>Dit account wordt waarschijnlijk al gebruikt door een andere ASF-instantie, wat wordt gezien als ongedefinieerd gedrag. Weigeren om het voort te zetten!</value>
<value>Dit account wordt waarschijnlijk al gebruikt door een andere ASF-instantie, wat wordt gezien als ongedefinieerd gedrag. Weigeren om het proces voort te zetten!</value>
</data>
<data name="BotLootingFailed" xml:space="preserve">
<value>Ruilaanbod mislukt!</value>

View File

@@ -44,7 +44,7 @@ namespace ArchiSteamFarm {
internal const string ServiceDescription = "ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.";
internal const string ServiceName = "ArchiSteamFarm";
internal const string StatisticsServer = "asf.justarchi.net";
internal const string VersionNumber = "2.3.0.4";
internal const string VersionNumber = "2.3.0.6";
internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
}