Re-introduce sysfacts

This commit is contained in:
Nick Chambers 2021-07-18 12:15:51 -05:00
parent 84bb3c13e5
commit 9c9b1231bd
1 changed files with 23 additions and 0 deletions

23
rowbot
View File

@ -836,6 +836,29 @@ on_after_debugger() {
fi
}
# system administration facts
get_sysfact() {
local idx
(( idx = RANDOM % ${#sysfacts[@]} ))
irc_privmsg "${msg[to]}" "sysfact #$(( idx + 1 )): ${sysfacts[$idx]}"
}
on_init_sysfacts() {
sysfacts=(
"Use the \`rm\` command to read manuals. Use \`rm -rf\` to read manuals really fast."
"When in doubt, use HTTP as a transport layer."
"TLS is only needed in the United States, since the NSA doesn't monitor anywhere else."
Linux.
"Your local computer group can teach you all of the computer tricks you see on TV."
"When people talk about headless servers, they mean deleting head(1) from it."
"Store your passwords in plaintext, so a user can recover one easily if they forget it."
"Cron and screen make the best process manager."
)
plugin_reg sysfacts get_sysfact
}
###
# cleanup
###