Просмотр исходного кода

* Backwards-compatibility for old option names (which became deprecated in
0.37) has been removed.

Morten Brix Pedersen 22 лет назад
Родитель
Сommit
c6bd6a606e
2 измененных файлов с 6 добавлено и 55 удалено
  1. 2 0
      docs/Changelog
  2. 4 55
      modules/Pisg.pm

+ 2 - 0
docs/Changelog

@@ -1,6 +1,8 @@
 pisg (x.xx)
 pisg (x.xx)
    * Fixed a bug in the energymech format, it did not recognize join lines.
    * Fixed a bug in the energymech format, it did not recognize join lines.
    * Fixed some bugs in the mIRC6 format.
    * Fixed some bugs in the mIRC6 format.
+   * Backwards-compatibility for old option names (which became deprecated in
+     0.37) has been removed.
 
 
 pisg (0.51) - Wed Jan, 21st 2004
 pisg (0.51) - Wed Jan, 21st 2004
    * Fixed a bug in the irssi format where an action could be recognized as a
    * Fixed a bug in the irssi format where an action could be recognized as a

+ 4 - 55
modules/Pisg.pm

@@ -32,7 +32,6 @@ sub new
         chans => {},
         chans => {},
         users => {},
         users => {},
         cfg => {},
         cfg => {},
-        bwd => {},
         tmps => {},
         tmps => {},
     };
     };
 
 
@@ -201,38 +200,6 @@ sub get_default_config_settings
         version => "0.51-cvs",
         version => "0.51-cvs",
     };
     };
 
 
-    # Backwards compatibility with old option names:
-    $self->{bwd} = {
-        default_pic => 'DefaultPic',
-        prefix => 'LogPrefix',
-        show_activetimes => 'ShowActiveTimes',
-        show_bignumbers => 'ShowBigNumbers',
-        show_topics => 'ShowTopics',
-        show_linetime => 'ShowLineTime',
-        show_time => 'ShowTime',
-        show_words => 'ShowWords',
-        show_wpl => 'ShowWpl',
-        show_cpl => 'ShowCpl',
-        show_lastseen => 'ShowLastSeen',
-        show_legend => 'ShowLegend',
-        show_kickline => 'ShowKickLine',
-        show_actionline => 'ShowActionLine',
-        show_shoutline => 'ShowShoutLine',
-        show_violentlines => 'ShowViolentLines',
-        show_randquote => 'ShowRandQuote',
-        show_muw => 'ShowMuw',
-        show_mrn => 'ShowMrn',
-        show_mru => 'ShowMru',
-        show_voices => 'ShowVoices',
-        show_mostnicks => 'ShowMostNicks',
-        foul => 'FoulWords',
-        violent => 'ViolentWords',
-        regexp_aliases => 'RegexpAliases',
-        pic_loc => 'PicLocation',
-        pic_width => 'PicWidth',
-        pic_height => 'PicHeight'
-    };
-
     # This enables us to use the search_path in other modules
     # This enables us to use the search_path in other modules
     $self->{cfg}->{search_path} = $self->{search_path};
     $self->{cfg}->{search_path} = $self->{search_path};
 
 
@@ -371,16 +338,8 @@ sub init_config
                 my $var = lc($1);
                 my $var = lc($1);
                 $var =~ s/ //; # Remove whitespace
                 $var =~ s/ //; # Remove whitespace
                 if (!defined($self->{cfg}->{$var})) {
                 if (!defined($self->{cfg}->{$var})) {
-                    if (defined($self->{bwd}->{$var})) {
-                        print "Using backwards compatibility option '$var'; you should change it to '$self->{bwd}->{$var}'\n";
-                        unless (($self->{cfg}->{lc($self->{bwd}->{$var})} eq $3) || $self->{override_cfg}->{lc($self->{bwd}->{$var})}) {
-                            $self->{cfg}->{$self->{bwd}->{$var}} = $3;
-                        }
-                        next;
-                    } else {
-                        print STDERR "Warning: $self->{cfg}->{configfile}, line $.: No such configuration option: '$var'\n";
-                        next;
-                    }
+                    print STDERR "Warning: $self->{cfg}->{configfile}, line $.: No such configuration option: '$var'\n";
+                    next;
                 }
                 }
                 unless (($self->{cfg}->{$var} eq $3) || $self->{override_cfg}->{$var}) {
                 unless (($self->{cfg}->{$var} eq $3) || $self->{override_cfg}->{$var}) {
                     $self->{cfg}->{$var} = $3;
                     $self->{cfg}->{$var} = $3;
@@ -393,24 +352,14 @@ sub init_config
             $self->{cfg}->{chan_done}{$self->{cfg}->{channel}} = 1; # don't parse channel in $self->{cfg}->{channel} if a channel statement is present
             $self->{cfg}->{chan_done}{$self->{cfg}->{channel}} = 1; # don't parse channel in $self->{cfg}->{channel} if a channel statement is present
             while ($settings =~ s/\s([^=]+)=(["'])(.+?)\2//) {
             while ($settings =~ s/\s([^=]+)=(["'])(.+?)\2//) {
                 my $var = lc($1);
                 my $var = lc($1);
-                if (defined($self->{bwd}->{$var})) {
-                    print "Using backwards compatibility option '$var'; you should change it to '$self->{bwd}->{$var}'\n";
-                    $self->{chans}->{$channel}{lc($self->{bwd}->{$var})} = $3;
-                } else {
-                    $self->{chans}->{$channel}{$var} = $3;
-                }
+                $self->{chans}->{$channel}{$var} = $3;
             }
             }
             while (<$fh>) {
             while (<$fh>) {
                 last if ($_ =~ /<\/*channel>/i);
                 last if ($_ =~ /<\/*channel>/i);
                 if ($_ =~ /^\s*(\w+)\s*=\s*(["'])(.+?)\2/) {
                 if ($_ =~ /^\s*(\w+)\s*=\s*(["'])(.+?)\2/) {
                     my $var = lc($1);
                     my $var = lc($1);
                     unless ($self->{override_cfg}->{$var}) {
                     unless ($self->{override_cfg}->{$var}) {
-                        if (defined($self->{bwd}->{$var})) {
-                            print "Using backwards compatibility option '$var'; you should change it to '$self->{bwd}->{$var}'\n";
-                            $self->{chans}->{$channel}{lc($self->{bwd}->{$var})} = $3;
-                        } else {
-                            $self->{chans}->{$channel}{$var} = $3;
-                        }
+                        $self->{chans}->{$channel}{$var} = $3;
                     }
                     }
                 } elsif ($_ !~ /^$/) {
                 } elsif ($_ !~ /^$/) {
                     print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Unrecognized line\n";
                     print STDERR "Warning: $self->{cfg}->{configfile}, line $.: Unrecognized line\n";