# See __END__ for more information use strict; use warnings; my $NAME = 'More Ignore'; my $VERSION = '004'; my $DESC = "More ignore options"; Xchat::register($NAME, $VERSION, $DESC); Xchat::print("\02$NAME $VERSION\02 by b0at"); # # Edit the arrays below: # # presistent per-channel conference mode my @hide_joinpart = ( '#xchat', '#flood', '#perl', '#b0at', ); # hide events by their name in the text events list -- must match exactly my @print_events = ( 'Change Nick', 'Whois Away Line', ); # hide by numerical or text event from server (eg PRVIMSG, NOTICE, 105) my @server_events = ( ); # hide public (channel) messages by regex # (case insensitive) my @public_patterns = ( '^re$', '^h(?:ello|i|ey)', 'asl', ); # # Code and docs below # # join/part my %jp = (); @jp{ map {lc $_} @hide_joinpart } = undef; # public Xchat::hook_print('Channel Message', \&hide_match); Xchat::hook_print('Channel Msg Hilight', \&hide_match); # public action Xchat::hook_print('Channel Action', \&hide_match); Xchat::hook_print('Channel Action Hilight', \&hide_match); # private Xchat::hook_print('Private Message', \&hide_match); Xchat::hook_print('Private Message to Dialog', \&hide_match); # dcc Xchat::hook_print('DCC Chat Text', \&hide_match); # events Xchat::hook_print( $_, sub{return Xchat::EAT_ALL}) foreach (@print_events); Xchat::hook_server($_, sub{return Xchat::EAT_ALL}) foreach (@server_events); sub hide_match { # hooked to channel messages $_[0][ $#{$_[0]} ] # the msg is the last item in array: 3 for dcc chat, 1 usually otherwise =~ /$_/i && return Xchat::EAT_XCHAT foreach (@public_patterns); return Xchat::EAT_NONE; # default: pass through } Xchat::hook_print('Join', sub{ return exists $jp{lc $_[0][1]} ? Xchat::EAT_XCHAT : Xchat::EAT_NONE } ); Xchat::hook_print($_, sub{ return exists $jp{lc $_[0][2]} ? Xchat::EAT_XCHAT : Xchat::EAT_NONE } ) foreach ('Part', 'Part with Reason'); # Uncomment these three lines to hide quits as well #Xchat::hook_print('Quit', # sub{ return exists $jp{lc Xchat::get_info('channel')} # ? Xchat::EAT_XCHAT : Xchat::EAT_NONE } ); 1; __END__ by: b0at license: public domain Really needs a command to edit prefs without loading, I know. Uncomment the three lines just above __END__ to hide quits in the channels as well as joins/parts.