Differences between revisions 1 and 2
Revision 1 as of 2016-05-23 04:13:33
Size: 2101
Editor: Stryjar
Comment: Perl script to ignore channel voices
Revision 2 as of 2016-05-23 04:17:17
Size: 2134
Editor: Stryjar
Comment:
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
Change channel names as needed.

Hexchat Tips

Hexchat is a popular IRC client for Windows. For more information see https://hexchat.github.io Bitlbee indicates user online status via +v and -v modes. Almost all IRC clients will print this mode change to the channel.

Scripts

Hexchat supports Perl, Python and Lua scripts for customization.

Preventing Hexchat from printing "Bitlbee gives channel half-operator status to $USER"

If you want Hexchat to not print these incessant changes, load the Perl script below in Hexchat. Change channel names as needed. You will probably need the correct version Perl provided by Hexchat - https://hexchat.github.io/downloads.html Tested with HexChat 2.12.1 and Hexchat provided Perl 5.20.0

# Name:        ignore_chan_voices.pl
# Version:     002
# Author:      LifeIsPain < idontlikespam (at) orvp [dot] net >
# Date:        2010-04-29
# Description: Ignore voices that are given and removed in specified channels.

# Version History
# 001  2010-02-10 Initial Version for someone in #xchat
# 002  2010-04-29 Also ignore raw modes if only item
# 003  2016-05-23 Update for Hexchat, thanks to LifeIsPain < idontlikespam (at) orvp [dot] net >
# Original at https://github.com/hexchat/hexchat-addons/blob/master/perl/ignore_chan_voices/ignore_chan_voices.pl

use strict;
use warnings;
use HexChat qw (:all);

register('Ignore Chan Voices', '002', 'Ignore voice and devoice on specified channels');

for ('Channel Voice', 'Channel DeVoice') {
        hook_print($_, \&ignore_voice);
}
hook_print('Raw Modes', \&ignore_raw_voice);

# specified the channels you wish to ignore in here, same format, lower case channels
my %ignore_list = (
        '&gtalk' => 1,
        '&steam' => 1,
);

sub ignore_voice {
        my $chan = lc get_info('channel');
        return EAT_HEXCHAT if (defined $ignore_list{$chan});
        return EAT_NONE;
}

sub ignore_raw_voice {
        my $chan = get_info('channel');
        return EAT_HEXCHAT if (defined $ignore_list{lc $chan} && $_[0][1] =~ m/^$chan [-+]v /i);
        return EAT_NONE;
}

BitlBee Wiki: Hexchat_tips (last edited 2016-05-23 04:27:03 by Stryjar)