Changeset 2156

Show
Ignore:
Timestamp:
01/30/07 12:38:04
Author:
miyagawa
Message:

add --port option

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • POE-Component-Client-Lingr/trunk/eg/lingr-ircd.pl

    r2155 r2156  
    33use warnings; 
    44use POE qw( Component::Server::IRC Component::Client::Lingr Component::TSTP ); 
     5use Getopt::Long; 
     6 
     7GetOptions('--api-key=s', \my $apikey, '--port' => \my $port); 
     8Getopt::Long::Configure("bundling"); 
    59 
    610#$POE::Component::Client::Lingr::Debug = 1; 
    711 
    8 my $api_key = $ARGV[0] or die "Usage: lingr-ircd.pl API_KEY\n"; 
     12$api_key or die "Usage: lingr-ircd.pl API_KEY\n"; 
    913 
    1014our $Root = "lingr"; 
     
    1216my $config = { 
    1317    api_key => $api_key, 
    14     server  => 'irc.lingr', 
     18    server  => "lingr.ircd", 
     19    port    => $port, 
    1520}; 
    1621 
     
    171176    # Set topic 
    172177    $heap->{ircd}->_daemon_cmd_topic($heap->{nick}, $heap->{channel}, $event->{room}->{description}); 
     178 
     179    # TODO: display recent messages by $Root user 
    173180} 
    174181