mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-23 04:19:27 +01:00
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:
parent
778933caad
commit
4bda217774
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user