Changeset 401 for bot


Ignore:
Timestamp:
11/11/11 18:53:03 (12 years ago)
Author:
nanardon
Message:
  • die if irc nick name is already in use
Location:
bot/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bot/trunk/bin/sophie-bot

    r399 r401  
    1919    'daemon' => \my $daemon, 
    2020    'runas=s' => \my $runas, 
     21    'pidfile=s' => \my $pidfile, 
    2122 
    2223    # Command option: 
     
    4142    $proxy       ||= $config{proxy}; 
    4243    $runas       ||= $config{runas}; 
     44    $pidfile     ||= $config{pidfile}; 
    4345} 
    4446 
     
    111113} 
    112114 
     115if ($pidfile) { 
     116    if (open(my $handle, '>', $pidfile)) { 
     117        print $handle $$ . "\n"; 
     118        close($handle); 
     119    } else { 
     120    } 
     121} 
     122 
    113123$sc->run; 
    114124 
  • bot/trunk/lib/Sophie/Bot/IRC.pm

    r397 r401  
    4141        package_states => [ 
    4242            ref($self)  => [ qw(_start irc_001 irc_public irc_msg ping_server 
    43                 irc_pong) ], 
     43                irc_pong irc_433) ], 
    4444        ], 
    4545    );  
Note: See TracChangeset for help on using the changeset viewer.