Respond when highlighted
This commit is contained in:
parent
ac5e3bfbdc
commit
c07d0f2bae
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue