Add a command for recalling one of Rowbot's memories
This commit is contained in:
parent
b107de7a1a
commit
8d48b4aadf
1 changed files with 11 additions and 1 deletions
12
rowbot
12
rowbot
|
@ -954,7 +954,17 @@ factoids_cmd_ls() {
|
||||||
}
|
}
|
||||||
|
|
||||||
plugin_not_found_factoids() {
|
plugin_not_found_factoids() {
|
||||||
true
|
if [[ -f "${config[fact-root]}"/"${msg[to]}"/"$action" ]]; then
|
||||||
|
# The exit status isn't important here.
|
||||||
|
# shellcheck disable=SC2155
|
||||||
|
local fact=$(<"${config[fact-root]}"/"${msg[to]}"/"$action")
|
||||||
|
|
||||||
|
if [[ ${action_args[0]} = \> ]] && (( ${#action_args[@]} > 1 )); then
|
||||||
|
irc_privmsg "${msg[to]}" "${action_args[-1]}: $fact"
|
||||||
|
else
|
||||||
|
irc_privmsg "${msg[to]}" "${msg[from]}: $fact"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
on_init_factoids() {
|
on_init_factoids() {
|
||||||
|
|
Loading…
Reference in a new issue