Changeset 116
- Timestamp:
- 05/30/08 18:17:28 (6 months ago)
- Files:
-
- trunk/antimatter/tim/Scripts/time-bot.plx (modified) (6 diffs)
- trunk/antimatter/tim/TimeDB (added)
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 2 2 # Copyright (C) 2005, 2006, 2007 Software Freedom Law Center, Inc. 3 3 # Author: Bradley M. Kuhn <bkuhn@softwarefreedom.org> … … 15 15 # <http://www.gnu.org/licenses/>. 16 16 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 20 unshift(@INC, "./Modules"); 18 21 19 22 use strict; … … 26 29 use Date::Manip; 27 30 28 my $PID_FILE = " /home/ircbot/pids/time-bot.pid";31 my $PID_FILE = "time-bot.pid"; 29 32 30 33 my $PAGE_EMAIL = 'page@example.org'; 31 34 32 my @CHANNELS = ( { channel => "#mainchannel", 33 password => 'PASS' }); 35 my @CHANNELS = ( { channel => "#antimatter" 36 }); 37 # password => 'PASS' }); 34 38 ############################################################################### 35 39 { … … 67 71 68 72 unless (defined $server and defined $channel) { 69 $server = " localhost";70 $channel = "# mainchannel";73 $server = "irc.freenode.net"; 74 $channel = "#antimatter"; 71 75 } 72 if ($channel eq "# mainchannel") {73 $channel = [ { channel => "#mainchannel" ,74 password => 'PASS', 75 invite_nick => 'ChanServ'}];76 if ($channel eq "#antimatter") { 77 $channel = [ { channel => "#mainchannel" }]; 78 # password => 'PASS' 79 # invite_nick => 'ChanServ'}]; 76 80 } else { 77 81 $channel = [ { channel => "$channel" } ]; 78 82 } 79 open(PASSWORD, "< /home/ircbot/passwords/tim")83 open(PASSWORD, "<./oldtimebot") 80 84 or die "unable to open password file: $!"; 81 85 my(%passwords); … … 88 92 89 93 die "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}; 92 96 93 97 ############################################################################### … … 107 111 port => "6667", 108 112 nick => $nick, 109 password => $passwords{server_password},110 ignore_list => [qw/ tim tem log/],113 # password => $passwords{server_password}, 114 ignore_list => [qw/LazyLuke/], 111 115 ssl => 1, 112 116 username => "TimeTrack", 113 117 name => "SFLC Time Tracking Bot", 114 dbPath => ' /home/ircbot/TimeDB'118 dbPath => './TimeDB' 115 119 ); 116 120