MessageHistory: now tracks channel mode changes on users

This commit is contained in:
Pragmatic Software 2019-07-23 12:19:34 -07:00
parent 9465636304
commit 20a7ff992d
2 changed files with 5 additions and 2 deletions

View File

@ -226,6 +226,9 @@ sub on_mode {
}
if (defined $target and length $target) {
my $message_account = $self->{pbot}->{messagehistory}->get_message_account($nick, $user, $host);
$self->{pbot}->{messagehistory}->add_message($message_account, "$nick!$user\@$host", $channel, "MODE $mode $target", $self->{pbot}->{messagehistory}->{MSG_CHAT});
if ($modifier eq '-') {
$self->{pbot}->{nicklist}->delete_meta($channel, $target, "+$mode_char");
} else {

View File

@ -408,9 +408,9 @@ sub recall_message {
if ($text =~ s/^(NICKCHANGE)\b/changed nick to/ or
$text =~ s/^(KICKED|QUIT)\b/lc "$1"/e or
$text =~ s/^MODE ([^ ]+) (.*)/set mode $1 on $2/ or
$text =~ s/^(JOIN|PART)\b/lc "$1ed"/e) {
# fix ugly "[nick] quit Quit: Leaving." messages
$text =~ s/^(quit) (.*)/$1 ($2)/;
$text =~ s/^(quit) (.*)/$1 ($2)/; # fix ugly "[nick] quit Quit: Leaving."
$recall_text .= "[$ago] $msg->{nick} $text\n";
} elsif ($text =~ s/^\/me\s+//) {
$recall_text .= "[$ago] * $msg->{nick} $text\n";