Introduction to Triggers

Triggers come in two flavours: calls and filters. A list of the triggers in the codebase can be found in the repository's triggers_list.txt file.

Calls

A call is simply a function invoked by Chyrp Lite at a certain point in time, optionally with a set of arguments. When a call is invoked, active modules will be scanned for responder functions (or aliases) matching the name of the call. Responder functions within those modules will be executed with the arguments sent by the call.

There is no specific return value, however the call will return whatever value the final responder returns.

Filters

The goal of a filter is to modify a particular target and return the modification. A filter takes the target for filtering as the first argument, and any additional arguments subsequently. When a filter is invoked, active modules will be scanned for responder functions (or aliases) matching the name of the filter. Responder functions within those modules will be executed. Multiple filters can be stacked, with each module able to set the priority of each of its filters.

The return value is the modified target.