On signal

From Scriptwiki
Revision as of 21:08, 8 April 2008 by Daveoh (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The on signal event triggers if a script has used the /signal command to send a signal to all scripts.

on *:SIGNAL:name:command

The signal name can contain wildcards.

The $signal identifier returns the signal name that caused the signal event to trigger.

The $1- identifier returns the parameters that were specified in the /signal command.

Note: The script that called /signal is triggered first, and then all other scripts are triggered.

Example

on *:SIGNAL:load:hmake database 100 | if ($isfile(database.hsh)) hload database database.hsh

When the "load" signal is triggered, creates a hash table and loads data into the hash table if available.

See Also