3
0
mirror of https://github.com/pragma-/pbot.git synced 2024-11-27 06:19:25 +01:00

Use proper letter-casing of nick in recall command results

This commit is contained in:
Pragmatic Software 2014-04-02 01:58:35 +00:00
parent 1ec463f021
commit 4e8aa560e8
2 changed files with 6 additions and 11 deletions

View File

@ -533,6 +533,7 @@ sub recall_message {
}
my @messages = @{ $self->{pbot}->antiflood->message_history->{$found_mask}->{channels}->{$channel}{messages} };
my ($found_nick) = $found_mask =~ m/^([^!]+)/;
if($recall_history =~ /^\d+$/) {
# integral history
@ -572,26 +573,20 @@ sub recall_message {
$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 $ago = ago(gettimeofday - $messages[$recall_history]->{timestamp});
if(not defined $recall_text) {
if($text =~ s/^\/me\s+//) {
$recall_text = "[$ago] * $recall_nick $text";
$recall_text = "[$ago] * $found_nick $text";
} else {
$recall_text = "[$ago] <$recall_nick> $text";
$recall_text = "[$ago] <$found_nick> $text";
}
} else {
if($text =~ s/^\/me\s+//) {
$recall_text .= " [$ago] * $recall_nick $text";
$recall_text .= " [$ago] * $found_nick $text";
} else {
$recall_text .= " [$ago] <$recall_nick> $text";
$recall_text .= " [$ago] <$found_nick> $text";
}
}
}

View File

@ -13,7 +13,7 @@ use warnings;
# These are set automatically by the build/commit script
use constant {
BUILD_NAME => "PBot",
BUILD_REVISION => 536,
BUILD_REVISION => 537,
BUILD_DATE => "2014-04-01",
};