summaryrefslogtreecommitdiffstats
path: root/konversation/src/konversation-0.19-colorcodes.pl
blob: 5016c796e244679fb417978323266fa8b96a49ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /usr/bin/perl

use strict;

my $currentGroup = "";
my $key;
my $value;

while (<>)
{
    chomp;
    if ( /^\[/ )
    {
        $currentGroup = $_;
        next;
    }
    ($key, $value) = ($_ =~ /([^=]+)=[ \t]*([^\n]+)/);
    if ($_ =~ /FilterColorCodes/)
    {
        print("# DELETE $currentGroup$key\n");
        if ($value eq "true")
        {
            print("AllowColorCodes=false\n");
        }
    }
}