Software Freedom Law Center

Changeset 116

Show
Ignore:
Timestamp:
05/30/08 18:17:28 (6 months ago)
Author:
bkuhn
Message:

r154@hughes: bkuhn | 2008-05-30 18:17:11 -0400

  • Minro changes to time-bot.plx script to get test running on freenode
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/antimatter/tim/Scripts/time-bot.plx

    r53 r116  
    1 #!/usr/bin/perl 
     1#!/usr/bin/perl -I ./Modules 
    22# Copyright (C) 2005, 2006, 2007   Software Freedom Law Center, Inc. 
    33#  Author: Bradley M. Kuhn <bkuhn@softwarefreedom.org> 
     
    1515# <http://www.gnu.org/licenses/>. 
    1616 
    17 unshift(@INC, "/home/ircbot/Bots/Modules"); 
     17# I hard coded this script to run out of the cwd.  This is for testing 
     18# purposes and since Landon is replacing this, no worries. 
     19 
     20unshift(@INC, "./Modules"); 
    1821 
    1922use strict; 
     
    2629use Date::Manip; 
    2730 
    28 my $PID_FILE = "/home/ircbot/pids/time-bot.pid"; 
     31my $PID_FILE = "time-bot.pid"; 
    2932 
    3033my $PAGE_EMAIL = 'page@example.org'; 
    3134 
    32 my @CHANNELS = ( { channel => "#mainchannel", 
    33                    password => 'PASS' }); 
     35my @CHANNELS = ( { channel => "#antimatter" 
     36                   }); 
     37#                   password => 'PASS' }); 
    3438############################################################################### 
    3539{ 
     
    6771 
    6872unless (defined $server and defined $channel) { 
    69   $server = "localhost"; 
    70   $channel = "#mainchannel"; 
     73  $server = "irc.freenode.net"; 
     74  $channel = "#antimatter"; 
    7175} 
    72 if ($channel eq "#mainchannel") { 
    73   $channel = [ { channel => "#mainchannel", 
    74                                                 password => 'PASS', 
    75                                                 invite_nick => 'ChanServ'}]; 
     76if ($channel eq "#antimatter") { 
     77  $channel = [ { channel => "#mainchannel" }]; 
     78#                                                password => 'PASS' 
     79#                                                invite_nick => 'ChanServ'}]; 
    7680} else { 
    7781  $channel = [ { channel => "$channel" } ]; 
    7882} 
    79 open(PASSWORD, "</home/ircbot/passwords/tim") 
     83open(PASSWORD, "<./oldtimebot") 
    8084  or die "unable to open password file: $!"; 
    8185my(%passwords); 
     
    8892 
    8993die "Unable to find password in password file"  
    90   unless defined $passwords{nick_password} 
    91   and defined $passwords{server_password}; 
     94  unless defined $passwords{nick_password}; 
     95#  and defined $passwords{server_password}; 
    9296 
    9397############################################################################### 
     
    107111                                           port   => "6667", 
    108112                                           nick     => $nick, 
    109                                       password => $passwords{server_password}, 
    110                                             ignore_list => [qw/tim tem log/], 
     113#                                      password => $passwords{server_password}, 
     114                                            ignore_list => [qw/LazyLuke/], 
    111115                                           ssl   => 1, 
    112116                                           username => "TimeTrack", 
    113117                                           name     => "SFLC Time Tracking Bot", 
    114                                             dbPath => '/home/ircbot/TimeDB' 
     118                                            dbPath => './TimeDB' 
    115119                       ); 
    116120 

SFLC Main Page

[frdm] Support SFLC