make butt work outside of build dir

This commit is contained in:
long.haired.steve 2009-11-10 15:18:52 +00:00
parent b5573cd464
commit 84fb5ace8a
3 changed files with 9 additions and 2 deletions

View File

@ -6,6 +6,7 @@ use warnings;
use Math::Random;
use TeX::Hyphen;
use Data::Dumper;
use FindBin qw($Bin);
use Carp;
use fields qw/replace_freq
@ -24,8 +25,9 @@ sub new {
$self = fields::new($self);
}
my %args = (hyphen_file => 'hyphen.tex',
stopwords_file => 'stopwords',
my %args = (hyphen_file => "$Bin/hyphen.tex",
stopwords_file => "$Bin/stopwords",
debug => 0,
meme => 'butt',
replace_freq => (1/11), # original value from tef.

4
butt
View File

@ -2,6 +2,10 @@
use strict;
use warnings;
BEGIN {
use FindBin qw($Bin);
push @INC, $Bin;
}
use Butts;
my $butt = $ARGV[0] // "butt";

View File

@ -181,6 +181,7 @@ sub kicked {
my ($channel, $who, $who_by, $why) =
@{$ref}{qw/channel kicked who reason/};
$who_by = $who_by || "<UNKNOWN>";
$self->log("$who just got kicked from $channel by $who_by: \"$why\"\n");
if ($self->is_me($who)) {
$self->in_channel($channel, 0);