Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
26
bitchx-docs/7_Docs/Serial_Numbers
Normal file
26
bitchx-docs/7_Docs/Serial_Numbers
Normal file
@@ -0,0 +1,26 @@
|
||||
Using Hooks with Serial Numbers
|
||||
|
||||
One of the neat things about ON hooks is that multiple hooks of the same
|
||||
type may be given different priorities. A serial number may be any number,
|
||||
positive or negative; zero is the default and should not be used directly.
|
||||
The numbers themselves don't really matter, rather their relation to other
|
||||
serial numbers is what's important. For example:
|
||||
|
||||
on hook "*" echo foobar
|
||||
on #-hook -5 "*" echo booya
|
||||
on #-hook 5 "*" echo yadda yadda yadda
|
||||
|
||||
Then, when any HOOK command is issued, the following three lines will be
|
||||
displayed, in this order:
|
||||
|
||||
booya
|
||||
foobar
|
||||
yadda yadda yadda
|
||||
|
||||
In general, it is always advisable to use serial numbers, if for no other
|
||||
reason than to prevent hooks from conflicting with each other. This is
|
||||
particularly true of the TIMER hook, which should always use serial numbers.
|
||||
|
||||
See Also:
|
||||
on(5)
|
||||
|
||||
Reference in New Issue
Block a user