Project

General

Profile

Actions

$eventtarget » History » Revision 7

« Previous | Revision 7/9 (diff) | Next »
Per Amundsen, 06/02/2018 05:04 PM


Added in 2.3

$eventtarget(type, [channel])

Returns the event target settings for a event type/channel.

0 = In Channel.
1 = In Status.
2 = Hide.

Number is relative to the event dropdowns.

Parameters

type - Event type to check (Join,Mode,Part,Topic,Quit,Ctcp,Kick,Nick,Names,Away,Invite,Whois,Error,Private,Wallops,Notice,Motd,SNotice,PingPong).
[channel] - The channel to check. (If no channel is specified, the global value is returned)

Example

on ^*:JOIN:*:{
  if ($eventtarget(join, #) == 2) {
    ; Hide
    halt
  }

  if ($eventtarget(join, #) == 1) {
    ; Show in status window.
    echo -s $nick joins #
  }
  else {
    ; Show in channel window.
    echo # $nick joins #
  }

  halt
}

Updated by Per Amundsen over 6 years ago · 7 revisions

Also available in: PDF HTML TXT