Respond when highlighted

This commit is contained in:
Al Beano 2020-05-21 01:01:34 +01:00
parent ac5e3bfbdc
commit c07d0f2bae
2 changed files with 4 additions and 3 deletions

View File

@ -79,7 +79,7 @@ sub said {
my $chattiness = $redis->get("$redis_prefix:".config("irc_server").":$msg->{channel}:chattiness"); my $chattiness = $redis->get("$redis_prefix:".config("irc_server").":$msg->{channel}:chattiness");
my $rand = rand 100; my $rand = rand 100;
if ($rand < $chattiness) { if ($rand < $chattiness || (config("respond_on_highlight") eq "true" && $msg->{address})) {
# generate a shitpost # generate a shitpost
my @line = split " ", $msg->{body}; my @line = split " ", $msg->{body};
return unless scalar(@line) >= 2; return unless scalar(@line) >= 2;

View File

@ -2,10 +2,11 @@
# General settings # General settings
# #
command_character: "." command_character: "."
insult: "you're a faggot" insult: ""
insult_chance: 2 # % chance that the bot will use the insult insult_chance: 0 # % chance that the bot will use the insult
# can be 0 to disable insults # can be 0 to disable insults
target_words: 4 # lowest number of words in an 'ideal' response target_words: 4 # lowest number of words in an 'ideal' response
respond_on_highlight: true
# #
# Redis Settings # Redis Settings