Module tracker

Track various states.

This module provides actions to assist in tracking various states during sequence execution.

Info:

  • Copyright: 2011-2015 Chad Phillips
  • Author: Chad Phillips

Actions

counter Incremental custom variable counter.


Actions

counter
Incremental custom variable counter.

This action provides a simple method to keep a count of any arbitrary value, and provides access to calling sequences by comparing a number against the total in the counter. It's useful for storing how many times you've done something, eg. on 3rd failed login attempt, hang up. Counters are initialized with a value of zero, and placed in storage area 'counter'.

  • action string counter
  • compare_to int (Optional) The value to compare the current counter value against.
  • if_equal string (Optional) The sequence to call if the counter value is equal to the 'compare_to' value.
  • if_greater string (Optional) The sequence to call if the counter value is greater than the 'compare_to' value.
  • if_less string (Optional) The sequence to call if the counter value is less than the 'compare_to' value.
  • increment int (Optional) Increment the counter by this amount before performing the comparison to the 'compare_to' parameter. Negative increments are allowed. Default is 1. To disable counting, set this to 0.
  • reset bool (Optional) Set to true to reset the counter to zero. This happens before any incrementing, so it can be used with incrementing to set a new initial value for the counter.
  • storage_key string (Optional) The key in the 'counter' storage area where the counter value is stored and checked. Default is 'counter'

Usage:

    {
      action = "counter",
      compare_to = profile.max_login_attempts,
      if_equal = "one_more_try",
      if_greater = "mailbox_login_failed",
      if_less = "login",
      increment = 1,
      reset = false,
      storage_key = "failed_login_counter",
    }
generated by LDoc 1.4.6 Last updated 2021-04-08 08:59:59