Hooks

+jhelp hooks

Action Hooks All actions have what are called ‘action hooks’, which are arbitrary commands that you can add to buckets to make the jobs process more automated and extensively expand the capabilities of the system. This is where the real power of Anomaly Jobs is located. These can be set either on the bucket or the bucket parent. If set on the bucket, an action hook will be for that local bucket only. If set on the parent, an action hook will be for all buckets. Setting them on a job is  silly, but possible (the hook will be destroyed when the job is, and won't  have any powers while it is there). The HOOK_ is passed three parameters: %0: Job DB# %1: DB# of action’s enactor. %2: DB# of the bucket.

Continued in: hooks2

+jhelp hooks2

Examples: &HOOK_CRE =&ASSIGNED_TO %0=%1 In the above example, the job is assigned to the creator. Since this is   set on the parent, this behavior is global. &HOOK_APR =@trigger [v(VA)]/TRIG_LOG=%0,[v(VA)] In the above example, the job will log to the server logfile when it is   +job/approved. Since it is set on the parent, it is global behavior. &HOOK_ADD =@pemit/list [u(%0/OPENED_BY)]=JOBS: Comments added to [name(%0)] by [name(%1)];@set %0/[dec(get(%0/NUM_COMMENT))]= no_inherit In the above example, whenever anyone /adds to a job in the REQ bucket, the player who opened it is sent a broadcast message, and then the comment is published (no_inherit set on a COMMENT_* determines if it is   published or not). See also: letters