mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-27 06:19:25 +01:00
Prettify grab
output similiar to recall
(#14)
This commit is contained in:
parent
6d4ea57d3b
commit
a8a82b2f23
@ -249,10 +249,16 @@ sub grab_quotegrab {
|
|||||||
my $text = $quotegrab->{text};
|
my $text = $quotegrab->{text};
|
||||||
($grab_nick) = split /\+/, $grab_nicks, 2;
|
($grab_nick) = split /\+/, $grab_nicks, 2;
|
||||||
|
|
||||||
if($text =~ s/^\/me\s+//) {
|
if ($text =~ s/^(NICKCHANGE)\b/changed nick to/ or
|
||||||
return "Quote grabbed: $quotegrab->{id}: * $grab_nick $text";
|
$text =~ s/^(KICKED|QUIT)\b/lc "$1"/e or
|
||||||
|
$text =~ s/^(JOIN|PART)\b/lc "$1ed"/e) {
|
||||||
|
# fix ugly "[nick] quit Quit: Leaving." messages
|
||||||
|
$text =~ s/^(quit) (.*)/$1 ($2)/;
|
||||||
|
return "Quote grabbed: $quotegrab->{id}: $grab_nick $text";
|
||||||
|
} elsif ($text =~ s/^\/me\s+//) {
|
||||||
|
return "Quote grabbed: $quotegrab->{id}: * $grab_nick $text";
|
||||||
} else {
|
} else {
|
||||||
return "Quote grabbed: $quotegrab->{id}: <$grab_nick> $text";
|
return "Quote grabbed: $quotegrab->{id}: <$grab_nick> $text";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user