$eventtarget » History » Version 1
Per Amundsen, 01/26/2016 05:14 AM
| 1 | 1 | Per Amundsen | _Added in 2.3_ |
|---|---|---|---|
| 2 | |||
| 3 | *$eventtarget(type, #channel)* |
||
| 4 | |||
| 5 | Returns the event target settings for a event type/channel. |
||
| 6 | |||
| 7 | 0 = In Channel. |
||
| 8 | 1 = In Status. |
||
| 9 | 2 = Hide. |
||
| 10 | |||
| 11 | _Number is relative to the event dropdowns._ |
||
| 12 | |||
| 13 | *Parameters* |
||
| 14 | |||
| 15 | type - Event type join,mode,part,topic,quit,ctcp,kick,nick. |
||
| 16 | #channel - The channel to check. |
||
| 17 | |||
| 18 | *Example* |
||
| 19 | |||
| 20 | <pre> |
||
| 21 | on *:JOIN:*:{ |
||
| 22 | if ($eventtarget(join, #) == 2) { |
||
| 23 | ; Hide |
||
| 24 | halt |
||
| 25 | } |
||
| 26 | |||
| 27 | if ($eventtarget(join, #) == 1) { |
||
| 28 | ; Show in status window. |
||
| 29 | echo -s $nick joins # |
||
| 30 | } |
||
| 31 | else { |
||
| 32 | ; Show in channel window. |
||
| 33 | echo # $nick joins # |
||
| 34 | } |
||
| 35 | } |
||
| 36 | </pre> |