Compare commits

..

15 Commits

Author SHA1 Message Date
JustArchi
b80dee15b0 Fix proxy bot commands 2017-06-15 21:51:27 +02:00
JustArchi
e1c0d780e1 Bump 2017-06-15 20:41:30 +02:00
JustArchi
e61f69e885 Misc 2017-06-15 20:41:17 +02:00
JustArchi
7630029a50 Translation updates 2017-06-15 20:38:52 +02:00
JustArchi
1356fc2ca4 Blacklist Summer Sale 2017 badge 2017-06-15 20:33:50 +02:00
JustArchi
70a9e0bb67 Packages update 2017-06-15 20:30:23 +02:00
JustArchi
b3c9fa3853 Misc 2017-06-15 20:27:57 +02:00
JustArchi
5b0aa72367 Misc 2017-06-15 02:59:03 +02:00
JustArchi
3ada24502f Misc 2017-06-15 02:57:06 +02:00
JustArchi
6714f5bf2b Add hack that closes #573 2017-06-14 16:58:36 +02:00
JustArchi
b2f523ca03 Add patreon link 2017-06-13 19:07:29 +02:00
JustArchi
4e4349e9ba Misc ArchiBoT optimization 2017-06-13 09:33:21 +02:00
JustArchi
d140664765 Translations update 2017-06-13 07:40:32 +02:00
JustArchi
e8120f172f Add !stats command 2017-06-13 07:35:41 +02:00
JustArchi
717666e271 Bump 2017-06-11 20:11:16 +02:00
84 changed files with 213 additions and 46 deletions

View File

@@ -80,7 +80,7 @@
<Private>False</Private>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.5.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.5.0-beta6\lib\Net45\HtmlAgilityPack.dll</HintPath>
<HintPath>..\packages\HtmlAgilityPack.1.5.0-beta8\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Humanizer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
<HintPath>..\packages\Humanizer.Core.2.2.0\lib\netstandard1.0\Humanizer.dll</HintPath>

View File

@@ -993,20 +993,17 @@ namespace ArchiSteamFarm {
Steam.TradeOfferRequest singleTrade = new Steam.TradeOfferRequest();
HashSet<Steam.TradeOfferRequest> trades = new HashSet<Steam.TradeOfferRequest> { singleTrade };
byte itemID = 0;
foreach (Steam.Item item in inventory) {
if (itemID >= Trading.MaxItemsPerTrade) {
if (singleTrade.ItemsToGive.Assets.Count >= Trading.MaxItemsPerTrade) {
if (trades.Count >= Trading.MaxTradesPerAccount) {
break;
}
singleTrade = new Steam.TradeOfferRequest();
trades.Add(singleTrade);
itemID = 0;
}
singleTrade.ItemsToGive.Assets.Add(item);
itemID++;
}
const string referer = SteamCommunityURL + "/tradeoffer/new";

View File

@@ -663,6 +663,8 @@ namespace ArchiSteamFarm {
return ResponseRestart(steamID);
case "!SA":
return await ResponseStatus(steamID, SharedInfo.ASF).ConfigureAwait(false);
case "!STATS":
return ResponseStats(steamID);
case "!STATUS":
return ResponseStatus(steamID);
case "!STOP":
@@ -1155,8 +1157,16 @@ namespace ArchiSteamFarm {
await Start().ConfigureAwait(false);
}
// This function should have no processing, it's just an alias to lowest permission having a command access
private bool IsAllowedToExecuteCommands(ulong steamID) => IsFamilySharing(steamID);
private static bool IsAllowedToExecuteCommands(ulong steamID) {
if (steamID == 0) {
ASF.ArchiLogger.LogNullError(nameof(steamID));
return false;
}
// This should have reference to lowest permission for command execution
bool result = Bots.Values.Any(bot => bot.IsFamilySharing(steamID));
return result;
}
private bool IsFamilySharing(ulong steamID) {
if (steamID == 0) {
@@ -3300,6 +3310,20 @@ namespace ArchiSteamFarm {
return responses.Count > 0 ? string.Join("", responses) : null;
}
private string ResponseStats(ulong steamID) {
if (steamID == 0) {
ArchiLogger.LogNullError(nameof(steamID));
return null;
}
if (!IsOwner(steamID)) {
return null;
}
ushort memoryInMegabytes = (ushort) (GC.GetTotalMemory(true) / 1024 / 1024);
return FormatBotResponse(string.Format(Strings.BotStats, memoryInMegabytes));
}
private string ResponseStatus(ulong steamID) {
if (steamID == 0) {
ArchiLogger.LogNullError(nameof(steamID));

View File

@@ -39,7 +39,7 @@ namespace ArchiSteamFarm {
internal const ushort DefaultWCFPort = 1242;
// This is hardcoded blacklist which should not be possible to change
internal static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280, 480730, 566020 };
internal static readonly HashSet<uint> GlobalBlacklist = new HashSet<uint> { 267420, 303700, 335590, 368020, 425280, 480730, 566020, 639900 };
[JsonProperty(Required = Required.DisallowNull)]
internal readonly bool AutoRestart = true;

View File

@@ -19,7 +19,7 @@ namespace ArchiSteamFarm.Localization {
// przez narzędzie, takie jak ResGen lub Visual Studio.
// Aby dodać lub usunąć członka, edytuj plik .ResX, a następnie ponownie uruchom ResGen
// z opcją /str lub ponownie utwórz projekt VS.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Strings {
@@ -537,6 +537,15 @@ namespace ArchiSteamFarm.Localization {
}
}
/// <summary>
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Current memory usage: {0} MB..
/// </summary>
internal static string BotStats {
get {
return ResourceManager.GetString("BotStats", resourceCulture);
}
}
/// <summary>
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Bot is connecting to Steam network..
/// </summary>

View File

@@ -279,6 +279,7 @@
</root>

View File

@@ -328,6 +328,7 @@
</root>

View File

@@ -595,4 +595,5 @@
<value>Достъпът отказан!</value>
</data>
</root>

View File

@@ -279,6 +279,7 @@
</root>

View File

@@ -691,4 +691,5 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Používáte verzi, která je novější než poslední vydaná verze pro váš kanál aktualizací. Vezměte prosím na vědomí, že verze před vydáním jsou určeny pro uživatele, kteří vědí, jak hlásit chyby, řešit problémy a poskytovat zpětnou vazbu - neposkytujeme pro ně žádnou technickou podporu.</value>
</data>
</root>

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AcceptingTrade" xml:space="preserve">
<value>Acceptér handel: {0}</value>
<value>Acceptere handel: {0}</value>
<comment>{0} will be replaced by trade number</comment>
</data>
<data name="AutoUpdateCheckInfo" xml:space="preserve">
@@ -690,4 +690,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Du bruger en version, der er nyere end nyeste version for din opdaterings kanal. Bemærk venligst at pre-release versioner er dedikeret til brugere, der forstår at rapportere fejl, behandle spørgsmål og give feedback - ingen teknisk support vil blive givet.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Aktuel hukommelses brug: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -351,7 +351,7 @@ StackTrace:
<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">
<value>Bot sammelt Spiel: {0} ({1}, {2} Karte[n] verbleibend) von insgesamt {3} Spiel(en) ({4} Karte[n]) verbleibend zum Idlen (~{5}).</value>
<value>Bot sammelt Spiel: {0} ({1}, {2} Karte[n] verbleibend) von insgesamt {3} Spiel(en) ({4} Karte[n]) verbleibend zum Sammeln (~{5}).</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name, {2} will be replaced by number of cards left to idle, {3} will be replaced by total number of games to idle, {4} will be replaced by total number of cards to idle, {5} will be replaced by translated TimeSpan string (such as "1 day, 5 hours and 30 minutes")</comment>
</data>
<data name="BotStatusIdlingList" xml:space="preserve">
@@ -690,4 +690,5 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Du benutzt eine Version, die neuer ist als die letzte veröffentlichte Version deines Aktualisierungskanals. Bitte beachte, dass vorab veröffentlichte Versionen an Benutzer gerichtet sind, welche wissen, wie man Programmfehler meldet, mit Problemen umgeht und Rückmeldung gibt - es wird keine technische Unterstützung geleistet.</value>
</data>
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Du benutzt eine Version, die neuer ist als die letzte veröffentlichte Version deines Aktualisierungskanals. Bitte beachte, dass vorab veröffentlichte Versionen an Benutzer gerichtet sind, welche wissen, wie man Programmfehler meldet, mit Problemen umgeht und Rückmeldung gibt - es wird keine technische Unterstützung geleistet.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Momentaner Arbeitsspeicherverbrauch: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -662,4 +662,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Χρησιμοποιείτε μια έκδοση η οποία είναι νεότερη από την τελευταία έκδοση που κυκλοφόρησε για το κανάλι ενημερώσεών σας. Παρακαλούμε να θυμάστε ότι οι εκδόσεις που δεν έχουν κυκλοφορήσει ακόμη προορίζονται για χρήστες που γνωρίζουν πώς να αναφέρουν σφάλματα, να αντιμετωπίζουν προβλήματα και να στέλνουν σχόλια - δεν θα σας παρέχεται τεχνική υποστήριξη.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Τρέχουσα χρήση μνήμης: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -690,4 +690,5 @@ Trazo de pila:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Está utilizando una versión que es más reciente que la última versión liberada para su canal de actualización. Por favor, tenga en cuenta que las versiones preliminares están dedicadas a usuarios que saben cómo reportar errores, tratar con problemas y dar sus comentarios - no se dará soporte técnico.</value>
</data>
</root>

View File

@@ -427,4 +427,5 @@
</root>

View File

@@ -691,4 +691,5 @@ StackTrace :
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Vous utilisez une version qui est plus récente que la dernière version pour votre canal de mise à jour. Veuillez noter que pré-versions sont réservées aux utilisateurs qui savent comment signaler un bug, de traiter des questions et donnent vos commentaires - aucun support technique ne sera donnée.</value>
</data>
</root>

View File

@@ -691,4 +691,8 @@ StackTrace :
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Vous utilisez une version qui est plus récente que la dernière version pour votre canal de mise à jour. Veuillez noter que les pré-versions sont réservées aux utilisateurs qui savent comment signaler un bogue, gérer les soucis et donner un retour - aucun support technique ne sera fourni.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Mémoire actuellement utilisée : {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -518,4 +518,5 @@ StackTrace:
</root>

View File

@@ -316,6 +316,7 @@
</root>

View File

@@ -678,4 +678,5 @@ StackTrace: {2}</value>
<value>Hozzáférés megtagadva!</value>
</data>
</root>

View File

@@ -121,7 +121,10 @@
<value>Menerima Pertukaran: {0}</value>
<comment>{0} will be replaced by trade number</comment>
</data>
<data name="AutoUpdateCheckInfo" xml:space="preserve">
<value>ASF akan memeriksa versi baru setiap {0} secara otomatis.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "24 hours")</comment>
</data>
<data name="Content" xml:space="preserve">
<value>Konten: {0}</value>
<comment>{0} will be replaced by content string. Please note that this string should include newline for formatting.</comment>
@@ -472,7 +475,10 @@
<data name="BotAutomaticIdlingPausedAlready" xml:space="preserve">
<value>Idling otomatis sudah ditunda sebelumnya!</value>
</data>
<data name="BotAutomaticIdlingPausedWithCountdown" xml:space="preserve">
<value>Idling otomatis sekarang dihentikan! Anda memiliki {0} untuk memulai permainan.</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "5 minutes")</comment>
</data>
<data name="BotAutomaticIdlingResumedAlready" xml:space="preserve">
<value>Idling otomatis sudah dilanjuntkan sebelumnya!</value>
</data>
@@ -547,7 +553,10 @@
<value>Yang sudah dimiliki: {0} | {1}</value>
<comment>{0} will be replaced by game's ID (number), {1} will be replaced by game's name</comment>
</data>
<data name="BotRateLimitExceeded" xml:space="preserve">
<value>Melebihi batas; kami akan mencoba lagi setelah menunggu selama {0}...</value>
<comment>{0} will be replaced by translated TimeSpan string (such as "25 minutes")</comment>
</data>
<data name="BotReconnecting" xml:space="preserve">
<value>Menyambungkan kembali...</value>
</data>
@@ -677,5 +686,11 @@
<data name="ErrorAccessDenied" xml:space="preserve">
<value>Akses ditolak!</value>
</data>
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Anda menggunakan versi yang lebih baru daripada versi terbaru yang dirilis untuk saluran pembaruan Anda. Harap dicatat bahwa pra-rilis diperuntukkan untuk pengguna yang tahu bagaimana untuk melaporkan bug, berurusan dengan isu-isu dan memberikan umpan balik - tidak akan ada pemberian dukungan teknis.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Penggunaan memori saat ini: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -689,4 +689,5 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Stai utilizzando una versione più recente dell'ultima versione rilasciata per il tuo canale di aggiornamento. Sei pregato di notare che le versioni pre-release sono dedicate agli utenti che sono capaci di segnalare bug, affrontare problemi e lasciare feedback - non sarà dato nessun supporto tecnico.</value>
</data>
</root>

View File

@@ -688,4 +688,8 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>あなたの指定した更新チャンネルよりも新しいバージョンを使用しています。プレリリースバージョンはバグの報告と問題への対処、フィードバックのできるユーザー向けであることに留意してください - テクニカルサポートは行われません。</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>現在のメモリ使用量: {0} MB。</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -693,4 +693,5 @@ ASF 실행 파일의 이름이 적절한지 확인하시기 바랍니다!</value
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>마지막으로 릴리즈된 버전보다 최신 버전을 사용 중입니다. 시험판 버전은 버그 리포트, 문제 해결, 피드백을 제공하는 법을 아는 유저에게만 제공됩니다. - 기술 지원은 제공되지 않습니다.</value>
</data>
</root>

View File

@@ -688,4 +688,8 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Jūs naudojate versija kuri yra naujesnė nei paskutinė išleista versija jūsų naujinimo kanale. Atkreipkite dėmesį, kad išankstinio išleidimo versija yra skirta vartotojams, kurie žino, kaip pranešti apie klaidas, problemas - techninė parama nebus suteikiama.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Šiuo metu naudojama atminties: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -279,6 +279,7 @@
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Je gebruikt een nieuwere versie dan de laatste versie van je update kanaal. Hou er rekening mee dat pre-release versies alleen geschikt zijn voor gebruikers die weten hoe ze bugs moeten rapporteren, kunnen omgaan met problemen en feedback kunnen geven. Er wordt geen technische ondersteuning geboden.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Geheugen in gebruik: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Je gebruikt een nieuwere versie dan de laatste versie van je update kanaal. Hou er rekening mee dat pre-release versies alleen geschikt zijn voor gebruikers die weten hoe ze bugs moeten rapporteren, kunnen omgaan met problemen en feedback kunnen geven. Er wordt geen technische ondersteuning geboden.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Geheugen in gebruik: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -344,4 +344,5 @@
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Używasz wersji, która jest nowsza niż aktualna wersja dostępna na Twoim kanale aktualizacyjnym. Pamiętaj, że wersje wstępne są przeznaczone dla użytkowników, którzy wiedzą jak zgłaszać błędy, rozwiązywać problemy i przesyłać opinie - nie świadczymy dla nich pomocy technicznej.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Aktualne wykorzystanie pamięci: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -691,4 +691,5 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Você está usando uma versão que é mais nova que a última lançada para seu canal de atualizações. Por favor, tenha em mente que versões não finalizadas são dedicadas à usuários que sabem como reportar bugs, lidar com problemas e dar feedback - Nenhum suporte técnico será dado.</value>
</data>
</root>

View File

@@ -681,4 +681,5 @@ inválidas, abortando!</value>
<value>Acesso negado!</value>
</data>
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>You're using a version that is newer than latest released version for your update channel. Please note that pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Current memory usage: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -691,4 +691,5 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Folosești o versiune care este mai nouă față de ultima versiune lansată pentru canalul tău de actualizare. Te rugăm să reții că versiunile preliminare sunt dedicate utilizatorilor care știu cum să raporteze defecțiuni, să abordeze problemele și să ofere feedback - nu va fi oferit suport tehnic.</value>
</data>
</root>

View File

@@ -691,4 +691,5 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Вы используете версию, которая новее, чем последняя версия для выбранного канала обновлений. Помните, что пре-релизные версии предназначены для тех пользователей, которые знают, как сообщать о багах, справляться с ошибками и давать отзывы - техническая поддержка оказана не будет.</value>
</data>
</root>

View File

@@ -691,4 +691,8 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Je používaná verzia, ktorá je novšia ako posledná vydaná verzia pre tento aktualizačný kanál. Verzie pred vydaním sú určené pre užívateľov, ktorí vedia nahlasovať chyby, riešiť problémy a poskytovať spätnú väzbu - pre nich nie je poskytovaná žiadna technická podpora.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Aktuálne použitie pamäte: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -551,4 +551,5 @@ StackTrace:
</root>

View File

@@ -288,6 +288,7 @@
</root>

View File

@@ -692,4 +692,5 @@ StackTrace:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Du använder en version som är nyare än den senast släppta versionen i din uppdateringskanal. Vänligen notera att förhandsversioner är avsedda för användare med förmågan att rapportera buggar, handskas med eventuella problem och viljan att ge feedback - Ingen teknisk support kommer att ges.</value>
</data>
</root>

View File

@@ -279,6 +279,7 @@
</root>

View File

@@ -691,4 +691,8 @@ Yığın izleme:
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Güncelleme kanalınız için yayınlanmış en son sürümden daha yeni bir sürüm kullanıyorsunuz. Lütfen ön yayın sürümlerinin, hata raporlamayı, sorunlarla başa çıkmayı ve geribildirim yapmayı bilen kişiler için olduğunu unutmayın. Teknik destek verilmeyecektir.</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>Geçerli bellek kullanımı: {0} MB.</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -691,4 +691,5 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>Ви користуєтеся версією, яка новіша за останню версію у цьому каналі оновлення. Будь ласка, зверніть увагу, що пре-релізні версіі призначені для користувачів які вміють доповідати про помилки, вирішувати питання та надавати зворотній зв'язок - технічна підтримка не надається.</value>
</data>
</root>

View File

@@ -640,4 +640,5 @@ StackTrace:
</data>
</root>

View File

@@ -688,4 +688,8 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>您正使用最新的测试版本此版本是用于汇报bug使用的所以此版本将不会提供技术支持。</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>当前内存用量: {0} MB。</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -688,4 +688,8 @@
<data name="WarningPreReleaseVersion" xml:space="preserve">
<value>您目前使用的版本高於最新發布的版本。請注意預覽版是專門給了解如何回報bug、處理問題並提供回饋的使用者 - 並不提供技術支援。</value>
</data>
<data name="BotStats" xml:space="preserve">
<value>當前記憶體使用量: {0} MB。</value>
<comment>{0} will be replaced by number (in megabytes) of memory being used</comment>
</data>
</root>

View File

@@ -427,26 +427,28 @@ namespace ArchiSteamFarm {
ShutdownResetEvent.Set();
}
private static async void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs args) {
if (args?.ExceptionObject == null) {
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.ExceptionObject));
private static async void UnhandledExceptionHandler(object sender, UnhandledExceptionEventArgs e) {
if (e?.ExceptionObject == null) {
ASF.ArchiLogger.LogNullError(nameof(e) + " || " + nameof(e.ExceptionObject));
return;
}
ASF.ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
await Task.Delay(5000).ConfigureAwait(false);
ASF.ArchiLogger.LogFatalException((Exception) e.ExceptionObject);
await Task.Delay(1000).ConfigureAwait(false); // For writing stuff to logs
await Exit(1).ConfigureAwait(false);
}
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
if (args?.Exception == null) {
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs e) {
if (e?.Exception == null) {
ASF.ArchiLogger.LogNullError(nameof(e) + " || " + nameof(e.Exception));
return;
}
ASF.ArchiLogger.LogFatalException(args.Exception);
ASF.ArchiLogger.LogFatalException(e.Exception);
// Normally we should abort the application here, but many tasks are in fact failing in SK2 code which we can't easily fix
// Thanks Valve.
e.SetObserved();
}
[Flags]

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.1.8";
internal const string VersionNumber = "2.3.2.0";
internal static readonly Version Version = Assembly.GetEntryAssembly().GetName().Version;
}

View File

@@ -30,6 +30,8 @@ using HtmlAgilityPack;
namespace ArchiSteamFarm {
internal sealed class SteamSaleEvent : IDisposable {
private const byte MaxSingleQueuesDaily = 3;
private readonly Bot Bot;
private readonly Timer SteamDiscoveryQueueTimer;
@@ -57,7 +59,7 @@ namespace ArchiSteamFarm {
return;
}
for (byte i = 0; (i < 3) && (await IsDiscoveryQueueAvailable().ConfigureAwait(false)).GetValueOrDefault(); i++) {
for (byte i = 0; (i < MaxSingleQueuesDaily) && (await IsDiscoveryQueueAvailable().ConfigureAwait(false)).GetValueOrDefault(); i++) {
HashSet<uint> queue = await Bot.ArchiWebHandler.GenerateNewDiscoveryQueue().ConfigureAwait(false);
if (queue == null) {
break;
@@ -69,7 +71,7 @@ namespace ArchiSteamFarm {
continue;
}
i = byte.MaxValue;
i = MaxSingleQueuesDaily;
break;
}
}

View File

@@ -29,6 +29,7 @@ using System.Globalization;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using Humanizer;
namespace ArchiSteamFarm {
@@ -108,7 +109,39 @@ namespace ArchiSteamFarm {
yield return item;
}
internal static string ToHumanReadable(this TimeSpan timeSpan) => timeSpan.Humanize(3);
internal static string ToHumanReadable(this TimeSpan timeSpan) {
// TODO: Remove this awful hack once we get rid of ILRepack in .NET core, Humanize() should always work
try {
return timeSpan.Humanize(3);
} catch (ArgumentException) {
StringBuilder result = new StringBuilder();
if (timeSpan.Days > 0) {
result.Append(timeSpan.Days + " " + (timeSpan.Days > 1 ? "days" : "day") + ", ");
}
if (timeSpan.Hours > 0) {
result.Append(timeSpan.Hours + " " + (timeSpan.Hours > 1 ? "hours" : "hour") + ", ");
}
if (timeSpan.Minutes > 0) {
result.Append(timeSpan.Minutes + " " + (timeSpan.Minutes > 1 ? "minutes" : "minute") + ", ");
}
if (timeSpan.Seconds > 0) {
result.Append(timeSpan.Seconds + " " + (timeSpan.Seconds > 1 ? "seconds" : "second") + ", ");
}
if (result.Length == 0) {
return "0 seconds";
}
// Get rid of last comma + space
result.Length -= 2;
return result.ToString();
}
}
private static string[] GetArgs(this string[] args, byte argsToSkip = 1) {
if (args.Length < argsToSkip) {

View File

@@ -2,7 +2,7 @@
<packages>
<package id="Costura.Fody" version="1.6.2" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="2.1.0" targetFramework="net461" developmentDependency="true" />
<package id="HtmlAgilityPack" version="1.5.0-beta6" targetFramework="net461" />
<package id="HtmlAgilityPack" version="1.5.0-beta8" targetFramework="net461" />
<package id="Humanizer" version="2.2.0" targetFramework="net461" />
<package id="Humanizer.Core" version="2.2.0" targetFramework="net461" />
<package id="Humanizer.Core.af" version="2.2.0" targetFramework="net461" />

View File

@@ -49,7 +49,7 @@
<Private>False</Private>
</Reference>
<Reference Include="HtmlAgilityPack, Version=1.5.0.0, Culture=neutral, PublicKeyToken=bd319b19eaf3b43a, processorArchitecture=MSIL">
<HintPath>..\packages\HtmlAgilityPack.1.5.0-beta6\lib\Net45\HtmlAgilityPack.dll</HintPath>
<HintPath>..\packages\HtmlAgilityPack.1.5.0-beta8\lib\Net45\HtmlAgilityPack.dll</HintPath>
</Reference>
<Reference Include="Humanizer, Version=2.2.0.0, Culture=neutral, PublicKeyToken=979442b78dfc278e, processorArchitecture=MSIL">
<HintPath>..\packages\Humanizer.Core.2.2.0\lib\netstandard1.0\Humanizer.dll</HintPath>

View File

@@ -248,19 +248,21 @@ namespace ArchiSteamFarm {
}
ASF.ArchiLogger.LogFatalException((Exception) args.ExceptionObject);
await Task.Delay(5000).ConfigureAwait(false);
await Task.Delay(1000).ConfigureAwait(false); // For writing stuff to logs
await Exit(1).ConfigureAwait(false);
}
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs args) {
if (args?.Exception == null) {
ASF.ArchiLogger.LogNullError(nameof(args) + " || " + nameof(args.Exception));
private static void UnobservedTaskExceptionHandler(object sender, UnobservedTaskExceptionEventArgs e) {
if (e?.Exception == null) {
ASF.ArchiLogger.LogNullError(nameof(e) + " || " + nameof(e.Exception));
return;
}
ASF.ArchiLogger.LogFatalException(args.Exception);
ASF.ArchiLogger.LogFatalException(e.Exception);
// Normally we should abort the application here, but many tasks are in fact failing in SK2 code which we can't easily fix
// Thanks Valve.
e.SetObserved();
}
}
}

View File

@@ -2,7 +2,7 @@
<packages>
<package id="Costura.Fody" version="1.6.2" targetFramework="net461" developmentDependency="true" />
<package id="Fody" version="2.1.0" targetFramework="net461" developmentDependency="true" />
<package id="HtmlAgilityPack" version="1.5.0-beta6" targetFramework="net461" />
<package id="HtmlAgilityPack" version="1.5.0-beta8" targetFramework="net461" />
<package id="Humanizer" version="2.2.0" targetFramework="net461" />
<package id="Humanizer.Core" version="2.2.0" targetFramework="net461" />
<package id="Humanizer.Core.af" version="2.2.0" targetFramework="net461" />

View File

@@ -1,19 +1,20 @@
# ArchiSteamFarm
[![Build Status (Windows)](https://img.shields.io/appveyor/ci/JustArchi/ArchiSteamFarm/master.svg?label=Windows&maxAge=60)](https://ci.appveyor.com/project/JustArchi/ArchiSteamFarm)
[![Build Status (Mono)](https://img.shields.io/travis/JustArchi/ArchiSteamFarm/master.svg?label=Mono&maxAge=60)](https://travis-ci.org/JustArchi/ArchiSteamFarm)
[![Build status (Windows)](https://img.shields.io/appveyor/ci/JustArchi/ArchiSteamFarm/master.svg?label=Windows&maxAge=60)](https://ci.appveyor.com/project/JustArchi/ArchiSteamFarm)
[![Build status (Mono)](https://img.shields.io/travis/JustArchi/ArchiSteamFarm/master.svg?label=Mono&maxAge=60)](https://travis-ci.org/JustArchi/ArchiSteamFarm)
[![License](https://img.shields.io/github/license/JustArchi/ArchiSteamFarm.svg?label=License&maxAge=86400)](./LICENSE-2.0.txt)
[![GitHub Release](https://img.shields.io/github/release/JustArchi/ArchiSteamFarm.svg?label=Latest&maxAge=60)](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)
[![Github Downloads](https://img.shields.io/github/downloads/JustArchi/ArchiSteamFarm/latest/total.svg?label=Downloads&maxAge=60)](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)
[![GitHub release](https://img.shields.io/github/release/JustArchi/ArchiSteamFarm.svg?label=Latest&maxAge=60)](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)
[![Github downloads](https://img.shields.io/github/downloads/JustArchi/ArchiSteamFarm/latest/total.svg?label=Downloads&maxAge=60)](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/archisteamfarm/localized.svg)](https://github.com/JustArchi/ArchiSteamFarm/wiki/Localization)
[![Paypal.me Donate](https://img.shields.io/badge/Paypal.me-donate-yellow.svg)](https://www.paypal.me/JustArchi/1usd)
[![Paypal Donate](https://img.shields.io/badge/Paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4)
[![Bitcoin Donate](https://img.shields.io/badge/Bitcoin-donate-yellow.svg)](https://blockchain.info/payment_request?address=1Archi6M1r5b41Rvn1SY2FfJAzsrEUT7aT)
[![Steam Donate](https://img.shields.io/badge/Steam-donate-yellow.svg)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)
[![Patreon support](https://img.shields.io/badge/Patreon-support-yellow.svg)](https://www.patreon.com/JustArchi)
[![Paypal.me donate](https://img.shields.io/badge/Paypal.me-donate-yellow.svg)](https://www.paypal.me/JustArchi/1usd)
[![Paypal donate](https://img.shields.io/badge/Paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4)
[![Bitcoin donate](https://img.shields.io/badge/Bitcoin-donate-yellow.svg)](https://blockchain.info/payment_request?address=1Archi6M1r5b41Rvn1SY2FfJAzsrEUT7aT)
[![Steam donate](https://img.shields.io/badge/Steam-donate-yellow.svg)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)
[![Gitter](https://img.shields.io/gitter/room/JustArchi/ArchiSteamFarm.svg?label=Chat&maxAge=86400)](https://gitter.im/JustArchi/ArchiSteamFarm)
[![Steam Group](https://img.shields.io/badge/Steam-group-yellowgreen.svg)](https://steamcommunity.com/groups/ascfarm)
[![Steam group](https://img.shields.io/badge/Steam-group-yellowgreen.svg)](https://steamcommunity.com/groups/ascfarm)
[![Discord](https://img.shields.io/badge/Discord-join-blue.svg)](https://discord.gg/HStsVSB)
---

View File

@@ -28,7 +28,7 @@ deploy:
- provider: GitHub
tag: $(appveyor_repo_tag_name)
release: ArchiSteamFarm V$(appveyor_repo_tag_name)
description: '**NOTICE:** Pre-releases are experimental versions that often contain unpatched bugs, work-in-progress features or rewritten implementations. If you don''t consider yourself advanced user, please download **[latest stable release](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)** instead. Pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given. Check out ASF **[release cycle](https://github.com/JustArchi/ArchiSteamFarm/wiki/Release-cycle)** if you''d like to learn more.\n\n---\n\nThis is automated AppVeyor GitHub deployment, human-readable changelog should be available soon. In the meantime please refer to **[GitHub commits](https://github.com/JustArchi/ArchiSteamFarm/commits/$(appveyor_repo_tag_name))**.\n\n---\n\nASF is available for free. If you''re grateful for what we''re doing, please consider donating. Developing ASF requires massive amount of time and knowledge, especially when it comes to Steam (and its problems). Even 1$ is highly appreciated and shows that you care!\n\n [![Paypal.me Donate](https://img.shields.io/badge/Paypal.me-donate-yellow.svg)](https://www.paypal.me/JustArchi/1usd) [![Paypal Donate](https://img.shields.io/badge/Paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4) [![Bitcoin Donate](https://img.shields.io/badge/Bitcoin-donate-yellow.svg)](https://blockchain.info/payment_request?address=1Archi6M1r5b41Rvn1SY2FfJAzsrEUT7aT) [![Steam Donate](https://img.shields.io/badge/Steam-donate-yellow.svg)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)'
description: '**NOTICE:** Pre-releases are experimental versions that often contain unpatched bugs, work-in-progress features or rewritten implementations. If you don''t consider yourself advanced user, please download **[latest stable release](https://github.com/JustArchi/ArchiSteamFarm/releases/latest)** instead. Pre-release versions are dedicated to users who know how to report bugs, deal with issues and give feedback - no technical support will be given. Check out ASF **[release cycle](https://github.com/JustArchi/ArchiSteamFarm/wiki/Release-cycle)** if you''d like to learn more.\n\n---\n\nThis is automated AppVeyor GitHub deployment, human-readable changelog should be available soon. In the meantime please refer to **[GitHub commits](https://github.com/JustArchi/ArchiSteamFarm/commits/$(appveyor_repo_tag_name))**.\n\n---\n\nASF is available for free. If you''re grateful for what we''re doing, please consider donating. Developing ASF requires massive amount of time and knowledge, especially when it comes to Steam (and its problems). Even 1$ is highly appreciated and shows that you care!\n\n [![Patreon support](https://img.shields.io/badge/Patreon-support-yellow.svg)](https://www.patreon.com/JustArchi) [![Paypal.me donate](https://img.shields.io/badge/Paypal.me-donate-yellow.svg)](https://www.paypal.me/JustArchi/1usd) [![Paypal donate](https://img.shields.io/badge/Paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=HD2P2P3WGS5Y4) [![Bitcoin donate](https://img.shields.io/badge/Bitcoin-donate-yellow.svg)](https://blockchain.info/address/1Archi6M1r5b41Rvn1SY2FfJAzsrEUT7aT) [![Steam donate](https://img.shields.io/badge/Steam-donate-yellow.svg)](https://steamcommunity.com/tradeoffer/new/?partner=46697991&token=0ix2Ruv_)'
auth_token:
secure: QC5gIDMvSpd43EG6qW8d1E3ZHiVU4aR7pbKQonXstjj/JtAABf5S1IbtoY4OsnOR
artifact: /.*/