Use botnick instead of trigger for stdin commands

Since trigger can be set to be a regex or character-class, use
botnick instead to ensure that commands are properly interpreted.
This commit is contained in:
Pragmatic Software 2015-04-19 01:53:46 -07:00
parent 778933caad
commit 4bda217774
1 changed files with 2 additions and 2 deletions

View File

@ -43,10 +43,10 @@ sub stdin_reader {
if($input =~ m/^~([^ ]+)\s+(.*)/) {
$from = $1;
$text = $self->{pbot}->{registry}->get_value('general', 'trigger') . $2;
$text = $self->{pbot}->{registry}->get_value('irc', 'botnick') . " $2";
} else {
$from = $self->{pbot}->{registry}->get_value('irc', 'botnick') . "!stdin\@localhost";
$text = $self->{pbot}->{registry}->get_value('general', 'trigger') . $input;
$text = $self->{pbot}->{registry}->get_value('irc', 'botnick') . " $input";
}
return $self->{pbot}->{interpreter}->process_line($from, $self->{pbot}->{registry}->get_value('irc', 'botnick'), "stdin", "localhost", $text);