mirror of
https://github.com/bol-van/zapret2.git
synced 2026-10-29 06:02:05 +00:00
zapret-auto: add comments
This commit is contained in:
1 parent
e5174bc9ad
commit
bb604f111c
1 file changed
+2
@@ -280,6 +280,7 @@ end
|
|||||||
-- for example, this can be used by custom protocol detectors
|
-- for example, this can be used by custom protocol detectors
|
||||||
-- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word)
|
-- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word)
|
||||||
-- arg: neg - invert condition function result
|
-- arg: neg - invert condition function result
|
||||||
|
-- test case : nfqws2 --qnum 200 --debug --lua-init=@zapret-lib.lua --lua-init=@zapret-auto.lua --lua-desync=condition:iff=cond_random --lua-desync=argdebug:testarg=1 --lua-desync=argdebug:testarg=2:morearg=xyz
|
||||||
function condition(ctx, desync)
|
function condition(ctx, desync)
|
||||||
require_iff(desync, "condition")
|
require_iff(desync, "condition")
|
||||||
orchestrate(ctx, desync)
|
orchestrate(ctx, desync)
|
||||||
@@ -295,6 +296,7 @@ end
|
|||||||
-- can be used with other orchestrators to stop execution conditionally
|
-- can be used with other orchestrators to stop execution conditionally
|
||||||
-- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word)
|
-- arg: iff - condition function. takes desync as arg and returns bool. (cant use 'if' because of reserved word)
|
||||||
-- arg: neg - invert condition function result
|
-- arg: neg - invert condition function result
|
||||||
|
-- test case : nfqws2 --qnum 200 --debug --lua-init=@zapret-lib.lua --lua-init=@zapret-auto.lua --in-range=-s1 --lua-desync=circular --lua-desync=stopif:iff=cond_random:strategy=1 --lua-desync=argdebug:strategy=1 --lua-desync=argdebug:strategy=2
|
||||||
function stopif(ctx, desync)
|
function stopif(ctx, desync)
|
||||||
require_iff(desync, "stopif")
|
require_iff(desync, "stopif")
|
||||||
orchestrate(ctx, desync)
|
orchestrate(ctx, desync)
|
||||||
|
|||||||
Reference in new issue
Block a user