Changeset 855

Show
Ignore:
Timestamp:
10/29/07 23:49:19 (13 months ago)
Author:
yappo
Message:

lang/perl/irssi/scripts/mobirc.pl: 設定のソースをyamlから読むようにした
lang/perl/irssi/scripts/mobirc.pl: overtaken #850

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/irssi/scripts/mobirc.pl

    r849 r855  
    4141    my $poe = sweet_args; 
    4242    my $session_id = $poe->session->ID; 
    43  
    44     my $channel_names  = {}; 
    45     my $channel_topics = {}; 
    46  
    47     for my $c ( map { $_->{name} } Irssi::channels() ) { 
    48         $channel_names->{ canon_name($c) } = $c; 
    49         $channel_topics->{ canon_name($c) } = $c; 
    50     } 
    5143 
    5244    my $conffname = Irssi::settings_get_str('mobirc_config_path'); 
     
    6961            _start => sub { 
    7062                $_[KERNEL]->alias_set('irc_session'); # create dummy irc_session 
     63                my $poe = sweet_args; 
     64  
     65                for my $c ( map { $_->{name} } Irssi::channels() ) { 
     66                    add_message( $poe, 
     67                        decode( $poe->heap->{config}->{irc}->{incode}, canon_name($c) ), 
     68                        undef, decode('utf8', 'Connected to irc server!'), 'connect' ); 
     69 
     70                    $poe->heap->{channel_name}->{ canon_name($c) } = $c; 
     71                    $poe->heap->{channel_topics}->{ canon_name($c) } = $c; 
     72                } 
    7173            }, 
    7274        }, 
     
    7678            channel_topic  => {}, 
    7779            channel_mtime  => {}, 
    78             channel_name   => $channel_names, 
    79             channel_topic  => $channel_topics, 
     80            channel_name   => {}, 
     81            channel_topic  => {}, 
    8082            config         => $config, 
    8183            irc            => bless({}, __PACKAGE__),