$eventtarget » History » Version 9
Per Amundsen, 02/16/2023 09:36 PM
1 | 1 | Per Amundsen | _Added in 2.3_ |
---|---|---|---|
2 | |||
3 | 8 | Per Amundsen | *$eventtarget(type, [channel], [nick])* |
4 | 1 | Per Amundsen | |
5 | Returns the event target settings for a event type/channel. |
||
6 | |||
7 | 9 | Per Amundsen | table(ktable). |
8 | |*Value*|*Description*| |
||
9 | | 0 | In Channel. | |
||
10 | | 1 | In Status. | |
||
11 | | 2 | Hide. | |
||
12 | 1 | Per Amundsen | |
13 | _Number is relative to the event dropdowns._ |
||
14 | |||
15 | *Parameters* |
||
16 | |||
17 | 9 | Per Amundsen | table(ktable). |
18 | |*Parameter*|*Description*| |
||
19 | | type | Event type to check (Join,Mode,Part,Topic,Quit,Ctcp,Kick,Nick,Names,Away,Invite,Whois,Error,Private,Wallops,Notice,Motd,SNotice,PingPong). | |
||
20 | | [channel] | The channel to check. (If no channel is specified, the global value is returned) | |
||
21 | | [nick] | if specified, the nick to check for the "[[Messages_Options#Only-show-join-parts-quits-nick-from-active-users<notextile>|</notextile>Only show join parts quits nick from active users]]" option. | |
||
22 | 1 | Per Amundsen | |
23 | *Example* |
||
24 | |||
25 | <pre> |
||
26 | 2 | Per Amundsen | on ^*:JOIN:*:{ |
27 | 1 | Per Amundsen | if ($eventtarget(join, #) == 2) { |
28 | ; Hide |
||
29 | halt |
||
30 | } |
||
31 | |||
32 | if ($eventtarget(join, #) == 1) { |
||
33 | ; Show in status window. |
||
34 | echo -s $nick joins # |
||
35 | } |
||
36 | else { |
||
37 | ; Show in channel window. |
||
38 | echo # $nick joins # |
||
39 | } |
||
40 | 2 | Per Amundsen | |
41 | halt |
||
42 | 1 | Per Amundsen | } |
43 | </pre> |