mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-27 14:29:30 +01:00
Use proper letter-casing of nick in recall command results
This commit is contained in:
parent
1ec463f021
commit
4e8aa560e8
@ -533,6 +533,7 @@ sub recall_message {
|
|||||||
}
|
}
|
||||||
|
|
||||||
my @messages = @{ $self->{pbot}->antiflood->message_history->{$found_mask}->{channels}->{$channel}{messages} };
|
my @messages = @{ $self->{pbot}->antiflood->message_history->{$found_mask}->{channels}->{$channel}{messages} };
|
||||||
|
my ($found_nick) = $found_mask =~ m/^([^!]+)/;
|
||||||
|
|
||||||
if($recall_history =~ /^\d+$/) {
|
if($recall_history =~ /^\d+$/) {
|
||||||
# integral history
|
# integral history
|
||||||
@ -572,26 +573,20 @@ sub recall_message {
|
|||||||
|
|
||||||
$self->{pbot}->logger->log("$nick ($from) recalled <$recall_nick/$channel> $messages[$recall_history]->{msg}\n");
|
$self->{pbot}->logger->log("$nick ($from) recalled <$recall_nick/$channel> $messages[$recall_history]->{msg}\n");
|
||||||
|
|
||||||
if(not defined $recall_nicks) {
|
|
||||||
$recall_nicks = $recall_nick;
|
|
||||||
} else {
|
|
||||||
$recall_nicks .= "+$recall_nick";
|
|
||||||
}
|
|
||||||
|
|
||||||
my $text = $messages[$recall_history]->{msg};
|
my $text = $messages[$recall_history]->{msg};
|
||||||
my $ago = ago(gettimeofday - $messages[$recall_history]->{timestamp});
|
my $ago = ago(gettimeofday - $messages[$recall_history]->{timestamp});
|
||||||
|
|
||||||
if(not defined $recall_text) {
|
if(not defined $recall_text) {
|
||||||
if($text =~ s/^\/me\s+//) {
|
if($text =~ s/^\/me\s+//) {
|
||||||
$recall_text = "[$ago] * $recall_nick $text";
|
$recall_text = "[$ago] * $found_nick $text";
|
||||||
} else {
|
} else {
|
||||||
$recall_text = "[$ago] <$recall_nick> $text";
|
$recall_text = "[$ago] <$found_nick> $text";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($text =~ s/^\/me\s+//) {
|
if($text =~ s/^\/me\s+//) {
|
||||||
$recall_text .= " [$ago] * $recall_nick $text";
|
$recall_text .= " [$ago] * $found_nick $text";
|
||||||
} else {
|
} else {
|
||||||
$recall_text .= " [$ago] <$recall_nick> $text";
|
$recall_text .= " [$ago] <$found_nick> $text";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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 => 536,
|
BUILD_REVISION => 537,
|
||||||
BUILD_DATE => "2014-04-01",
|
BUILD_DATE => "2014-04-01",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user