From 43c036135458b346408b6ea487ddfa741a29a8bd Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Sat, 19 Sep 2015 20:02:11 -0700 Subject: [PATCH] Add botnick to "Why would I want to do that to myself?" condition --- PBot/Interpreter.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PBot/Interpreter.pm b/PBot/Interpreter.pm index 95d4115d..0c5a902b 100644 --- a/PBot/Interpreter.pm +++ b/PBot/Interpreter.pm @@ -193,11 +193,13 @@ sub interpret { $arguments =~ s/(?{pbot}->{registry}->get_value('irc', 'botnick'); + + if (defined $arguments && ($arguments =~ m/^(your|him|her|its|it|them|their)(self|selves)$/i || $arguments =~ m/^$botnick$/i)) { my $delay = (rand 10) + 8; my $message = { nick => $nick, user => $user, host => $host, command => $command, checkflood => 1, - message => "Why would I want to do that to myself?" + message => "$nick: Why would I want to do that to myself?" }; $self->add_message_to_output_queue($from, $message, $delay); return undef;