mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-26 13:59:47 +01:00
factoids: Dont break factoids if used from stdin
This commit is contained in:
parent
ed797ca5cf
commit
a619f8fe9b
@ -265,7 +265,7 @@ sub interpreter {
|
|||||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from;
|
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from || "stdin";
|
||||||
|
|
||||||
return $self->{factoidmodulelauncher}->execute_module($from, $tonick, $nick, $user, $host, $keyword, $arguments);
|
return $self->{factoidmodulelauncher}->execute_module($from, $tonick, $nick, $user, $host, $keyword, $arguments);
|
||||||
}
|
}
|
||||||
@ -281,7 +281,7 @@ sub interpreter {
|
|||||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
||||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from;
|
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from || "stdin";
|
||||||
|
|
||||||
$self->{pbot}->logger->log("(" . (defined $from ? $from : "(undef)") . "): $nick!$user\@$host): $keyword: Displaying text \"" . $self->factoids->hash->{$channel}->{$keyword}->{action} . "\"\n");
|
$self->{pbot}->logger->log("(" . (defined $from ? $from : "(undef)") . "): $nick!$user\@$host): $keyword: Displaying text \"" . $self->factoids->hash->{$channel}->{$keyword}->{action} . "\"\n");
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ use warnings;
|
|||||||
# These are set automatically by the build/commit script
|
# These are set automatically by the build/commit script
|
||||||
use constant {
|
use constant {
|
||||||
BUILD_NAME => "PBot",
|
BUILD_NAME => "PBot",
|
||||||
BUILD_REVISION => 250,
|
BUILD_REVISION => 251,
|
||||||
BUILD_DATE => "2011-01-24",
|
BUILD_DATE => "2011-01-24",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user