The module-code Operator

Syntax
module-code

The Unlang interpreter tracks the return code of any module that has been called. This return code can be checked in any condition. If the saved return code matches the code given here, then the condition evaluates to true. Otherwise, it evaluates to false.

Module return codes cannot be set in a condition. Module return codes cannot be compared with anything else.

The list of valid return codes is as follows:

Table 1. Module Return Codes
Name Meaning

notfound

information was not found

noop

the module did nothing

ok

the module succeeded

updated

the module updated the request

fail

the module failed

reject

the module rejected the request

userlock

the user was locked out

invalid

the configuration was invalid

handled

the module has handled the request itself

Examples:

if (notfound) {
    ...
}