mirror of
https://github.com/pragma-/pbot.git
synced 2025-02-16 21:40:46 +01:00
Slightly improve recall
This commit is contained in:
parent
15c17744ba
commit
d29dcc3765
@ -294,6 +294,12 @@ sub recall_message {
|
|||||||
# set channel to current channel if not specified
|
# set channel to current channel if not specified
|
||||||
$recall_channel = $from if not defined $recall_channel;
|
$recall_channel = $from if not defined $recall_channel;
|
||||||
|
|
||||||
|
# another sanity check for people using it wrong
|
||||||
|
if ($recall_channel !~ m/^#/) {
|
||||||
|
$recall_history = "$recall_channel $recall_history";
|
||||||
|
$recall_channel = $from;
|
||||||
|
}
|
||||||
|
|
||||||
if (not defined $recall_nick and defined $recall_context) {
|
if (not defined $recall_nick and defined $recall_context) {
|
||||||
$recall_nick = $recall_context;
|
$recall_nick = $recall_context;
|
||||||
}
|
}
|
||||||
@ -351,9 +357,9 @@ sub recall_message {
|
|||||||
|
|
||||||
if(not defined $message) {
|
if(not defined $message) {
|
||||||
if(defined $account) {
|
if(defined $account) {
|
||||||
return "No such message for nick $found_nick in channel $recall_channel containing text '$recall_history'";
|
return "No message for nick $found_nick in channel $recall_channel containing \"$recall_history\"";
|
||||||
} else {
|
} else {
|
||||||
return "No such message in channel $recall_channel containing text '$recall_history'";
|
return "No message in channel $recall_channel containing \"$recall_history\".";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user