Changeset 582

Show
Ignore:
Timestamp:
10/21/07 19:06:52 (6 years ago)
Author:
typester
Message:

lang/perl/irssi/scripts/xcezx.pl: 無限ループよけのコード追加

Files:
1 modified

Legend:

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

    r576 r582  
    77our %IRSSI   = ( name => 'xcezx' ); 
    88 
     9my $last = 0; 
    910signal_add( 
    1011    'message public' => sub { 
    1112        my ( $server, $msg, $nick, $address, $target ) = @_; 
    12         $server->command("MSG $target xcezx--") if $msg =~ /xcezx--/; 
     13        return unless $msg =~ /xcezx--/; 
     14        return unless time >= $last+5; 
     15 
     16        $server->command("MSG $target xcezx--"); 
     17        $last = time; 
    1318    } 
    1419);