Project

General

Profile

$eventtarget » History » Version 7

Per Amundsen, 06/02/2018 05:04 PM

1 1 Per Amundsen
_Added in 2.3_
2
3 7 Per Amundsen
*$eventtarget(type, [channel])*
4 1 Per Amundsen
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 4 Per Amundsen
*Parameters*
14 1 Per Amundsen
15 7 Per Amundsen
type - Event type to check (Join,Mode,Part,Topic,Quit,Ctcp,Kick,Nick,Names,Away,Invite,Whois,Error,Private,Wallops,Notice,Motd,SNotice,PingPong).
16
[channel] - The channel to check. (If no channel is specified, the global value is returned)
17 1 Per Amundsen
18
*Example*
19
20
<pre>
21 2 Per Amundsen
on ^*:JOIN:*:{
22 1 Per Amundsen
  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 2 Per Amundsen
36
  halt
37 1 Per Amundsen
}
38
</pre>