choice between two RNGs
This commit is contained in:
parent
58e1f66319
commit
cd457755cb
|
@ -16,6 +16,7 @@ use MarkovBot::Commands;
|
|||
use MarkovBot::MarkovChain;
|
||||
use MarkovBot::Redis;
|
||||
use Encode qw(encode decode);
|
||||
use if (config("rng") eq "mt"), "Math::Random::MT::Perl" => qw(rand);
|
||||
|
||||
sub said {
|
||||
my $self = shift;
|
||||
|
|
|
@ -12,6 +12,7 @@ use lib $Bin;
|
|||
use MarkovBot::Config;
|
||||
use MarkovBot::Redis;
|
||||
use Encode qw(decode encode);
|
||||
use if (config("rng") eq "mt"), "Math::Random::MT::Perl" => qw(rand);
|
||||
|
||||
sub markov( $ ) {
|
||||
# markov - given two starting words, returns a markov chain result
|
||||
|
|
|
@ -21,3 +21,10 @@ irc_port: 6697
|
|||
irc_channel: "#baz"
|
||||
irc_nickname: shithead-ng
|
||||
irc_nickname2: shithead
|
||||
|
||||
#
|
||||
# RNG to use
|
||||
# This can be "rand" for perl's built in rand() function
|
||||
# Or "mt" to use the Math::Random::MT::Perl module (recommended)
|
||||
#
|
||||
rng: rand
|
||||
|
|
Loading…
Reference in New Issue