Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use Xchat ':all';
- use warnings;
- use strict;
- Xchat::register('xHilight', '0.1', 'Script made for Tabibibles', 'init');
- my %hilights = ();
- sub init {
- open my $fh, '<', (Xchat::get_info('xchatdir') . '/.xhilight');
- my $scope;
- while(my $text = <$fh>) {
- chomp($text);
- if($text =~ m/^\[(.+?)\]/) {
- $scope =~ s/(\s+|\t+)//g;
- $hilights{$scope} = {};
- next;
- }
- elsif($text) {
- $text =~ m/^(.+?)=(.+?)/;
- $hilights{$scope}->{$1} = $2;
- next;
- }
- else {
- next;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement