1 | ======================== |
---|
2 | Owl Advanced Users Guide |
---|
3 | ======================== |
---|
4 | |
---|
5 | |
---|
6 | ========================= |
---|
7 | Section X: CUSTOM FILTERS |
---|
8 | ========================= |
---|
9 | |
---|
10 | |
---|
11 | ========================== |
---|
12 | Section X: THE CONFIG FILE |
---|
13 | ========================== |
---|
14 | |
---|
15 | ======================= |
---|
16 | Section X: KEY BINDINGS |
---|
17 | ======================= |
---|
18 | |
---|
19 | |
---|
20 | ========================= |
---|
21 | Section X: COMMAND ALISES |
---|
22 | ========================= |
---|
23 | |
---|
24 | |
---|
25 | ================= |
---|
26 | Section X: STYLES |
---|
27 | ================= |
---|
28 | |
---|
29 | |
---|
30 | - - - - - - - - - - - - - - - - - - - - - - - - - - - |
---|
31 | |
---|
32 | |
---|
33 | For example, the following |
---|
34 | command will create a filter called 'mail' that maches any messages |
---|
35 | sent to the zephyr class 'mail': |
---|
36 | |
---|
37 | filter mail class ^mail$ |
---|
38 | |
---|
39 | The first argument after the filter command specifies the name of the |
---|
40 | filter to be created. The text after that indicates that matching |
---|
41 | messages must have the zephyr class "mail". For help understanding |
---|
42 | the '^' and '$' characters, consult a reference on regular |
---|
43 | expressions. Note that all pattern matching in Owl is |
---|
44 | case-insensitive. |
---|
45 | |
---|
46 | The message fields that can be used in a filter command include: |
---|
47 | |
---|
48 | sender message sender |
---|
49 | recipient message recipient |
---|
50 | class zephyr class name |
---|
51 | instance zephyr instance name |
---|
52 | opcode zephyr opcode |
---|
53 | realm zephyr realm |
---|
54 | body message body |
---|
55 | type message type ('zephyr', 'aim', 'admin') |
---|
56 | direction either 'in' 'out' or 'none'\n" |
---|
57 | login either 'login' 'logout' or 'none'\n" |
---|
58 | |
---|
59 | You can also use the operators 'and' 'or' and 'not' as well as the |
---|
60 | values 'true' and 'false'. Parentheses can be used to group |
---|
61 | expressions, though there must be spaces present before and after all |
---|
62 | parenthesis. For example: |
---|
63 | |
---|
64 | filter myfilt ( class ^foo$ ) or ( class ^quux$ and instance ^bar$ ) |
---|
65 | |
---|
66 | If you define a filter using a filter name that already exists, it |
---|
67 | will overwrite the existing filter. This can be a useful way to |
---|
68 | override the built-in filters. |
---|
69 | |
---|
70 | |
---|
71 | ========================== |
---|
72 | Section 6: THE CONFIG FILE |
---|
73 | ========================== |
---|
74 | |
---|
75 | *** WARNING: This interface may change substantially in the near future *** |
---|
76 | |
---|
77 | This file is interpreted by the perl interpreter. |
---|
78 | If you wish to execute an owl command use the |
---|
79 | function owl::command(). i.e. |
---|
80 | |
---|
81 | owl::command("set zsigproc \"/mit/kretch/bin/getzsig foo\""); |
---|
82 | |
---|
83 | will set the owl variable zsigproc. Note that commands will currently |
---|
84 | be executed in order after the called configuration subroutine exits. |
---|
85 | |
---|
86 | Subroutines created with the names below will be executed at the |
---|
87 | specified times: |
---|
88 | |
---|
89 | subroutine name properties |
---|
90 | --------------- ---------- |
---|
91 | owl::startup() run when owl first starts |
---|
92 | owl::shutdown() run when owl exits |
---|
93 | owl::format_msg() run when a new message arrives, the return |
---|
94 | value is used to display the message on the |
---|
95 | screen |
---|
96 | owl::receive_msg() run when a message is received, and after |
---|
97 | it has been added to the message list |
---|
98 | |
---|
99 | |
---|
100 | The following variables will be set each time a message is recevied: |
---|
101 | |
---|
102 | $owl::class, $owl::instance, $owl::recipient, |
---|
103 | $owl::sender, $owl::opcode, $owl::zsig, |
---|
104 | $owl::msg, $owl::time, $owl::host, @owl::fields, $owl::id |
---|
105 | |
---|
106 | The "appendtosepbar" variable may be set in owl::format_msg() |
---|
107 | to set text to be appended to sepbar that separates the received |
---|
108 | message list from the edit window. |
---|