From 7688b8bc3b43e85e45d273d66f1ff06d4ea1b6ea Mon Sep 17 00:00:00 2001 From: ruri Date: Tue, 9 Apr 2019 20:21:24 +0200 Subject: [PATCH] Fixed the missing references to BanOnTimeout bool in Navigate block. --- OpenBullet/LSDoc.xml | 4 ++-- RuriLib/Blocks/SBlockNavigate.cs | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/OpenBullet/LSDoc.xml b/OpenBullet/LSDoc.xml index 492079e..24e546a 100644 --- a/OpenBullet/LSDoc.xml +++ b/OpenBullet/LSDoc.xml @@ -379,11 +379,11 @@ TCP DISCONNECT This will spawn and execute a Navigate Block. Syntax: -NAVIGATE "URL" [TIMEOUT] +NAVIGATE "URL" [TIMEOUT] [BanOnTimeout?] Example: NAVIGATE "http://example.com" -NAVIGATE "http://example.com" 60 +NAVIGATE "http://example.com" 60 BanOnTimeout=True This will spawn and execute a BrowserAction Block. diff --git a/RuriLib/Blocks/SBlockNavigate.cs b/RuriLib/Blocks/SBlockNavigate.cs index 4edf3fd..7de899f 100644 --- a/RuriLib/Blocks/SBlockNavigate.cs +++ b/RuriLib/Blocks/SBlockNavigate.cs @@ -41,12 +41,14 @@ namespace RuriLib /* * Syntax: - * NAVIGATE "URL" TIMEOUT + * NAVIGATE "URL" [TIMEOUT] [BanOnTimeout?] * */ Url = LineParser.ParseLiteral(ref input, "URL"); if (LineParser.Lookahead(ref input) == TokenType.Integer) Timeout = LineParser.ParseInt(ref input, "TIMEOUT"); + if (LineParser.Lookahead(ref input) == TokenType.Boolean) + LineParser.SetBool(ref input, this); return this; } @@ -59,7 +61,8 @@ namespace RuriLib .Label(Label) .Token("NAVIGATE") .Literal(Url) - .Integer(Timeout, "Timeout"); + .Integer(Timeout, "Timeout") + .Boolean(BanOnTimeout, "BanOnTimeout"); return writer.ToString(); }