make butt work outside of build dir
This commit is contained in:
parent
b5573cd464
commit
84fb5ace8a
6
Butts.pm
6
Butts.pm
|
@ -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
4
butt
|
@ -2,6 +2,10 @@
|
|||
use strict;
|
||||
use warnings;
|
||||
|
||||
BEGIN {
|
||||
use FindBin qw($Bin);
|
||||
push @INC, $Bin;
|
||||
}
|
||||
use Butts;
|
||||
|
||||
my $butt = $ARGV[0] // "butt";
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue