mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-02 23:44:06 +01:00
MessageHistory: now tracks channel mode changes on users
This commit is contained in:
parent
9465636304
commit
20a7ff992d
@ -226,6 +226,9 @@ sub on_mode {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (defined $target and length $target) {
|
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 '-') {
|
if ($modifier eq '-') {
|
||||||
$self->{pbot}->{nicklist}->delete_meta($channel, $target, "+$mode_char");
|
$self->{pbot}->{nicklist}->delete_meta($channel, $target, "+$mode_char");
|
||||||
} else {
|
} else {
|
||||||
|
@ -408,9 +408,9 @@ sub recall_message {
|
|||||||
|
|
||||||
if ($text =~ s/^(NICKCHANGE)\b/changed nick to/ or
|
if ($text =~ s/^(NICKCHANGE)\b/changed nick to/ or
|
||||||
$text =~ s/^(KICKED|QUIT)\b/lc "$1"/e 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) {
|
$text =~ s/^(JOIN|PART)\b/lc "$1ed"/e) {
|
||||||
# fix ugly "[nick] quit Quit: Leaving." messages
|
$text =~ s/^(quit) (.*)/$1 ($2)/; # fix ugly "[nick] quit Quit: Leaving."
|
||||||
$text =~ s/^(quit) (.*)/$1 ($2)/;
|
|
||||||
$recall_text .= "[$ago] $msg->{nick} $text\n";
|
$recall_text .= "[$ago] $msg->{nick} $text\n";
|
||||||
} elsif ($text =~ s/^\/me\s+//) {
|
} elsif ($text =~ s/^\/me\s+//) {
|
||||||
$recall_text .= "[$ago] * $msg->{nick} $text\n";
|
$recall_text .= "[$ago] * $msg->{nick} $text\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user