mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-23 11:12:42 +01:00
Update ref_user to use full hostmask instead of just nick; add edited_by/edited_on to factoid metadata levels hash
This commit is contained in:
parent
d2d5695dda
commit
edff4b6c4c
@ -39,6 +39,8 @@ my %factoid_metadata_levels = (
|
||||
ref_count => 60,
|
||||
ref_user => 60,
|
||||
type => 60,
|
||||
edited_by => 60,
|
||||
edited_on => 60,
|
||||
# all others are allowed to be factset by anybody/default to level 0
|
||||
);
|
||||
|
||||
|
@ -297,7 +297,7 @@ sub interpreter {
|
||||
$pbot->logger->log("[" . (defined $from ? $from : "stdin") . "] ($nick!$user\@$host) [$keyword] aliased to: [$command]\n");
|
||||
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = "$nick!$user\@$host";
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
||||
|
||||
return $pbot->interpreter->interpret($from, $nick, $user, $host, $count, $command, $tonick);
|
||||
@ -325,7 +325,7 @@ sub interpreter {
|
||||
$self->{pbot}->logger->log("Found module\n");
|
||||
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = "$nick!$user\@$host";
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from || "stdin";
|
||||
|
||||
@ -341,7 +341,7 @@ sub interpreter {
|
||||
}
|
||||
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_count}++;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = $nick;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{ref_user} = "$nick!$user\@$host";
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_on} = gettimeofday;
|
||||
$self->factoids->hash->{$channel}->{$keyword}->{last_referenced_in} = $from || "stdin";
|
||||
|
||||
|
@ -13,7 +13,7 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 417,
|
||||
BUILD_REVISION => 418,
|
||||
BUILD_DATE => "2013-07-31",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user