| Massive simplification of annna commands. - annna - Annna the nice friendly bot. | |
| git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
| Log | |
| Files | |
| Refs | |
| Tags | |
| README | |
| --- | |
| commit 27ad444dd2f6c1952c6bbf6291b08a3291689e79 | |
| parent 73b30596a6d1d8ae3444ed03e43b1ad534dcff63 | |
| Author: Annna Robert-Houdin <[email protected]> | |
| Date: Sun, 19 Oct 2025 10:30:03 +0200 | |
| Massive simplification of annna commands. | |
| Thanks seninha for the hints! | |
| Diffstat: | |
| M annna-message-common | 687 ++++++++---------------------… | |
| M annna-start | 14 ++++++-------- | |
| M annna-stop | 14 ++++++-------- | |
| 3 files changed, 193 insertions(+), 522 deletions(-) | |
| --- | |
| diff --git a/annna-message-common b/annna-message-common | |
| @@ -337,10 +337,10 @@ do | |
| done | |
| if [ $runlinkbrother -eq 1 ] && [ $nospoil -eq 0 ]; | |
| then | |
| - critique=$($ANNNA_MODBASE/linkbrother/linkbrother.sh "$ANNNA_MODBASE/l… | |
| - if [ "$critique" ]; then | |
| - annna-say "$critique" | |
| - fi | |
| + critique="$($ANNNA_MODBASE/linkbrother/linkbrother.sh \ | |
| + "$ANNNA_MODBASE/linkbrother/db" \ | |
| + "${IRC_CMD_USER}" "${IRC_PRIVMSG_TEXT}")" | |
| + [ -n "$critique" ] && annna-say "$critique" | |
| fi | |
| case "${IRC_PRIVMSG_TEXT}" in | |
| @@ -389,86 +389,40 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| done | |
| annna-say "${IRC_CMD_USER}, ${finalexclamation}" | |
| ;; | |
| -*">:3"*) | |
| - annna-say "OMG IT'S A LION GET IN THE CAR!" | |
| - ;; | |
| +*">:3"*) annna-say "OMG IT'S A LION GET IN THE CAR!";; | |
| *"<3"*) | |
| love "${IRC_CMD_USER}++" | |
| annna-say "*o.o*" | |
| ;; | |
| -*"m(") | |
| - annna-say "(-‸ლ)" | |
| - ;; | |
| -*"*shrug*"*) | |
| - annna-say "¯\\_(ツ)_/¯" | |
| - ;; | |
| -*"*glare*"*) | |
| - annna-say "ಠ_ಠ" | |
| - ;; | |
| -*"*finger*"*) | |
| - annna-say "╭∩╮(ಠ_ಠ)╭∩╮" | |
| - ;; | |
| -*"*yolo*"*) | |
| - annna-say "Yᵒᵘ Oᶰˡʸ Lᶤᵛᵉ Oᶰᶜᵉ" | |
| - ;; | |
| -*":'(") | |
| - annna-say "(╯︵╰,)" | |
| - ;; | |
| -"Thanks ${IRC_USER}"*) | |
| - annna-say "${IRC_CMD_USER}, you are welcome." | |
| - ;; | |
| -*" ope sorry"*|"ope sorry"*) | |
| - annna-say "${IRC_CMD_USER}, 😃pe sorry." | |
| - ;; | |
| -"${IRC_USER}, snake.") | |
| +*"m(") annna-say "(-‸ლ)";; | |
| +*"*shrug*"*) annna-say "¯\\_(ツ)_/¯";; | |
| +*"*glare*"*) annna-say "ಠ_ಠ";; | |
| +*"*finger*"*) annna-say "╭∩╮(ಠ_ಠ)╭∩╮";; | |
| +*"*yolo*"*) annna-say "Yᵒᵘ Oᶰˡʸ Lᶤᵛᵉ Oᶰᶜᵉ";; | |
| +*":'(") annna-say "(╯︵╰,)";; | |
| +"Thanks ${IRC_USER}"*) annna-say "${IRC_CMD_USER}, you are welcome.";; | |
| +*" ope sorry"*|"ope sorry"*) annna-say "${IRC_CMD_USER}, 😃pe sorry.";; | |
| +"${IRC_USER}, snake"*) | |
| annna-say "${IRC_CMD_USER}, ssSSsSssSssSsssssSSsSSSSsSssSSSSsssSSSSsss… | |
| ;; | |
| -"${IRC_USER}, snoke.") | |
| - annna-say "${IRC_CMD_USER}, snoke again?" | |
| - ;; | |
| -"${IRC_USER}, amirite?") | |
| - annna-say "${IRC_CMD_USER}, Yep, you're the most correct of them all." | |
| - ;; | |
| -"${IRC_USER}, ping.") | |
| - annna-say "${IRC_CMD_USER}, pong." | |
| - ;; | |
| +"${IRC_USER}, snoke"*) annna-say "${IRC_CMD_USER}, snoke again?";; | |
| +"${IRC_USER}, amirite?") annna-say "${IRC_CMD_USER}, Yep, you're the most corr… | |
| +"${IRC_USER}, ping"*) annna-say "${IRC_CMD_USER}, pong.";; | |
| "${IRC_USER}, how lame is my nick?") | |
| lamenessstr="$(lameness "${IRC_CMD_USER}")" | |
| annna-say "${lamenessstr}" | |
| ;; | |
| -"${IRC_USER}, ding.") | |
| - annna-say "${IRC_CMD_USER}, dong." | |
| - ;; | |
| -"${IRC_USER}, irly"*) | |
| - annna-say "${IRC_CMD_USER}, I love you too." | |
| - ;; | |
| -"${IRC_USER}, bleep bloop.") | |
| - annna-say "${IRC_CMD_USER}, bloop bleep." | |
| - ;; | |
| -"${IRC_USER}, snare.") | |
| - annna-say "${IRC_CMD_USER}, not snare again!" | |
| - ;; | |
| -"${IRC_USER}, I am mad.") | |
| - annna-say "${IRC_CMD_USER}, we have a MAD SCIENTIST ONBOARD :>" | |
| - ;; | |
| -"${IRC_USER}, I am holy.") | |
| - annna-say "${IRC_CMD_USER}, Holy shit this guy is totally NUTS!!!" | |
| - ;; | |
| -"${IRC_USER}, please compliment me.") | |
| - annna-say "${IRC_CMD_USER}, you rock!" | |
| - ;; | |
| -"${IRC_USER}, what the karma?") | |
| - annna-say "${IRC_CMD_USER}, gophers://bitreich.org/1/irc/karma" | |
| - ;; | |
| -"${IRC_USER}, who is lovely?") | |
| - annna-say "${IRC_CMD_USER}, gophers://bitreich.org/1/irc/love" | |
| - ;; | |
| -"${IRC_USER}, what the brcon score?") | |
| - annna-say "${IRC_CMD_USER}, gophers://bitreich.org/1/con/$(date +%Y)/s… | |
| - ;; | |
| -"${IRC_USER}, what the shame?") | |
| - annna-say "${IRC_CMD_USER}, gophers://bitreich.org/1/irc/shame" | |
| - ;; | |
| +"${IRC_USER}, ding"*) annna-say "${IRC_CMD_USER}, dong.";; | |
| +"${IRC_USER}, irly"*) annna-say "${IRC_CMD_USER}, I love you too.";; | |
| +"${IRC_USER}, bleep bloop"*) annna-say "${IRC_CMD_USER}, bloop bleep." ;; | |
| +"${IRC_USER}, snare"*) annna-say "${IRC_CMD_USER}, not snare again!";; | |
| +"${IRC_USER}, I am mad"*) annna-say "${IRC_CMD_USER}, we have a MAD SCIENTIST … | |
| +"${IRC_USER}, I am holy"*) annna-say "${IRC_CMD_USER}, Holy shit this guy is t… | |
| +"${IRC_USER}, please compliment me"*) annna-say "${IRC_CMD_USER}, you rock!";; | |
| +"${IRC_USER}, what the karma?") annna-say "${IRC_CMD_USER}, gophers://bitreich… | |
| +"${IRC_USER}, who is lovely?") annna-say "${IRC_CMD_USER}, gophers://bitreich.… | |
| +"${IRC_USER}, what the brcon score?") annna-say "${IRC_CMD_USER}, gophers://bi… | |
| +"${IRC_USER}, what the shame?") annna-say "${IRC_CMD_USER}, gophers://bitreich… | |
| "${IRC_USER}, please generate a password for me.") | |
| newpws="$(pwgen -B1ny 20 10 | paste -sd ' ')" | |
| annna-say "${IRC_CMD_USER}, as you wish: ${newpws}" | |
| @@ -492,9 +446,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| "${IRC_USER}, please show me a video about "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 37-)" | |
| case "$word" in | |
| - *\?) | |
| - word="$(printf "%s\n" "${word}" | cut -c -"$((${#word} - 1))")" | |
| - ;; | |
| + *\?) word="$(printf "%s\n" "${word}" | cut -c -"$((${#word} - 1))")";; | |
| esac | |
| videoresult="$(idiotbox-roulette "${word}")" | |
| if [ -n "${videoresult}" ]; | |
| @@ -506,17 +458,12 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| ;; | |
| "${IRC_USER}, what is my fortune?") | |
| fortunecookie="$(fortune-cookie)" | |
| - if [ -n "${fortunecookie}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${fortunecookie}" | |
| - fi | |
| + [ -n "${fortunecookie}" ] && annna-say "${IRC_CMD_USER}, ${fortunecook… | |
| ;; | |
| "${IRC_USER}, what is "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 16-)" | |
| case "$word" in | |
| - *\?) | |
| - word="$(printf "%s\n" "${word}" | cut -c -"$((${#word} - 1))")" | |
| - ;; | |
| + *\?) word="$(printf "%s\n" "${word}" | cut -c -"$((${#word} - 1))")";; | |
| esac | |
| dictserver="dict.org" | |
| @@ -550,14 +497,14 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| fi | |
| rm ${tmpf} 2>/dev/null | |
| ;; | |
| -"${IRC_USER}, please give me the unix power.") | |
| +"${IRC_USER}, please give me the unix power"*) | |
| upcuri="$(unix-power)" | |
| if [ -n "${upcuri}" ]; | |
| then | |
| annna-say "${IRC_CMD_USER}, ${upcuri}" | |
| fi | |
| ;; | |
| -"${IRC_USER}, please stop the last emoji prompt.") | |
| +"${IRC_USER}, please stop the last emoji prompt"*) | |
| lastemojipromptpid="$(pgrep -f stable-diffusion-emoji | sort -n | tail… | |
| if [ -n "${lastemojipromptpid}" ]; | |
| then | |
| @@ -567,24 +514,17 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, sorry, no instances found." | |
| fi | |
| ;; | |
| -"${IRC_USER}, play despacito plz.") | |
| - annna-say "${IRC_CMD_USER}, gophers://bitreich.org/9/memecache/despaci… | |
| - ;; | |
| -"nice to meet you ${IRC_USER}"*) | |
| - annna-say "${IRC_CMD_USER}, the pleasure is on my side. :-)" | |
| - ;; | |
| -"${IRC_USER}, please give me a Chuck Norris fact.") | |
| +"${IRC_USER}, play despacito "*) annna-say "${IRC_CMD_USER}, gophers://bitreic… | |
| +"nice to meet you ${IRC_USER}"*) annna-say "${IRC_CMD_USER}, the pleasure is o… | |
| +"${IRC_USER}, please give me a Chuck Norris fact"*) | |
| chuck=$(chucknorris) | |
| annna-say "${IRC_CMD_USER}, ${chuck}" | |
| ;; | |
| -"${IRC_USER}, magic.") | |
| +"${IRC_USER}, magic"*) | |
| magictrick="$(magic)" | |
| - if [ -n "${magictrick}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${magictrick}" | |
| - fi | |
| + [ -n "${magictrick}" ] && annna-say "${IRC_CMD_USER}, ${magictrick}" | |
| ;; | |
| -"${IRC_USER}, please show me ip art.") | |
| +"${IRC_USER}, please show me ip art"*) | |
| annna-say "${IRC_CMD_USER}, please see #bitreich-tv for the magic." | |
| { | |
| cd $HOME/bin/modules/ip-art; | |
| @@ -592,7 +532,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| flock $HOME/bin/modules/ip-art -c "./display-file.sh ip-art.ip… | |
| } & | |
| ;; | |
| -"${IRC_USER}, I feel button.") | |
| +"${IRC_USER}, I feel button"*) | |
| buri="$(button-gen)" | |
| if [ -n "${buri}" ]; | |
| then | |
| @@ -601,7 +541,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, sorry, no feelings for you today." | |
| fi | |
| ;; | |
| -"${IRC_USER}, I feel stupid.") | |
| +"${IRC_USER}, I feel stupid"*) | |
| nuri=$(darwin) | |
| tmpf=$(mktemp) | |
| fetch-uri "${nuri}" > "${tmpf}" | |
| @@ -609,42 +549,27 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, do not feel stupid, others are more stupid… | |
| rm ${tmpf} 2>/dev/null | |
| ;; | |
| -"${IRC_USER}, I feel down.") | |
| +"${IRC_USER}, I feel down"*) | |
| postmortem="$(post-mortem | /br/bin/bitreich-paste)" | |
| annna-say "${IRC_CMD_USER}, do not feel bad, others had worse days: ${… | |
| ;; | |
| -"${IRC_USER}, I feel perl.") | |
| +"${IRC_USER}, I feel perl"*) | |
| perlfeelings="$(perl-feelings)" | |
| - if [ -n "${perl-feelings}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, I feel ${perlfeelings}" | |
| - fi | |
| - ;; | |
| -"${IRC_USER}, will you be my girlfriend?") | |
| - rejection="$(girlfriend)" | |
| - annna-say "${IRC_CMD_USER}, ${rejection}" | |
| + [ -n "${perl-feelings}" ] && annna-say "${IRC_CMD_USER}, I feel ${perl… | |
| ;; | |
| +"${IRC_USER}, will you be my girlfriend?") annna-say "${IRC_CMD_USER}, $(girlf… | |
| "${IRC_USER}, who fights crime?"|"${IRC_USER}, who is fighting crime?") | |
| partner=$(echo $brmembers | awk '{for (i = 1; i < NF; i++) print $i}' … | |
| crimefighter="$(theyfightcrime ${IRC_CMD_USER} ${partner})" | |
| annna-say "${crimefighter}" | |
| ;; | |
| -"${IRC_USER}, please give me a commit message.") | |
| - commitmsg="$(whatthecommit)" | |
| - annna-say "${commitmsg}" | |
| - ;; | |
| +"${IRC_USER}, please give me a commit message"*) annna-say "${IRC_CMD_USER}, $… | |
| "${IRC_USER}, please paint the irc channel.") | |
| emojiuri="$(emoji-channel-history "${ANNNA_IRCBASE}/${IRC_SERVER}/${IR… | |
| - if [ -n "${emojiuri}" ]; | |
| - then | |
| - annna-say "${emojiuri}" | |
| - fi | |
| + [ -n "${emojiuri}" ] && annna-say "${emojiuri}" | |
| ;; | |
| -"${IRC_USER}, birp.") | |
| - birdname="$(bird-name)" | |
| - annna-say "${IRC_CMD_USER}, I heard a ${birdname} bird." | |
| - ;; | |
| -"${IRC_USER}, please oneline me.") | |
| +"${IRC_USER}, birp"*) annna-say "${IRC_CMD_USER}, I heard a $(bird-name) bird.… | |
| +"${IRC_USER}, please oneline me"*) | |
| randomoneliner="$(oneliner)" | |
| if [ -z "${randomoneliner}" ]; | |
| then | |
| @@ -655,10 +580,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| ;; | |
| *"what's app?") | |
| maemoapp="$(whatsapp)" | |
| - if [ -n "${maemoapp}" ]; | |
| - then | |
| - annna-say "Have you tried? ${maemoapp}" | |
| - fi | |
| + [ -n "${maemoapp}" ] && annna-say "Have you tried? ${maemoapp}" | |
| ;; | |
| "${IRC_USER}, man "*|"${IRC_USER}, man "*) | |
| exp="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 12- | sed 's,\t, … | |
| @@ -673,19 +595,11 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${puri}" | |
| ;; | |
| -"${IRC_USER}, please pray for me.") | |
| - annna-say "${IRC_CMD_USER}, here, for you: gophers://bitreich.org/9/me… | |
| - ;; | |
| -"${IRC_USER}, nigger."|*nigger*|*NIGGER*) | |
| - nword="$(n-word)" | |
| - annna-say "${IRC_CMD_USER}, don't use the ${nword}!" | |
| - ;; | |
| +"${IRC_USER}, please pray for me"*) annna-say "${IRC_CMD_USER}, here, for you:… | |
| +"${IRC_USER}, nigger."|*nigger*|*NIGGER*) annna-say "${IRC_CMD_USER}, don't us… | |
| "${IRC_USER}, why was I breached?") | |
| breachtext="$(why-was-i-breached)" | |
| - if [ -n "${breachtext}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${breachtext}" | |
| - fi | |
| + [ -n "${breachtext}" ] && annna-say "${IRC_CMD_USER}, ${breachtext}" | |
| ;; | |
| "${IRC_USER}, please be responsible about "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 36- | sed 's,\t, … | |
| @@ -737,15 +651,11 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| suri="$(int2cunei "${word}" | head -n 1)" | |
| annna-say "${suri}" | |
| ;; | |
| -"${IRC_USER}, what is up with gopher man?") | |
| - # TODO | |
| - ;; | |
| +"${IRC_USER}, what is up with gopher man?");; #TODO | |
| "${IRC_USER}, what can I cook with "*) | |
| ingredients="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 29- | sed … | |
| case "$ingredients" in | |
| - *\?) | |
| - ingredients="$(printf "%s\n" "${ingredients}" | cut -c -"$(($(… | |
| - ;; | |
| + *\?) ingredients="$(printf "%s\n" "${ingredients}" | cut -c -"$(($(exp… | |
| esac | |
| results="$(fridge-recipe-search "${ingredients}")" | |
| @@ -887,9 +797,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| "${IRC_USER}, wolfram is "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 19- | sed 's,\t, … | |
| case "$word" in | |
| - *\?) | |
| - word="$(printf "%s\n" "${word}" | cut -c -"$(($(expr length "$… | |
| - ;; | |
| + *\?) word="$(printf "%s\n" "${word}" | cut -c -"$(($(expr length "${wo… | |
| esac | |
| puri="" | |
| @@ -931,19 +839,10 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| fi | |
| annna-say -- "${puri}" | |
| ;; | |
| -"${IRC_USER}, pray"*) | |
| - # Emulate https://threats.kaspersky.com/en/threat/IRC-Worm.DOS.Septic/ | |
| - annna-say "${IRC_CMD_USER}, I Obey my master! long live satan" | |
| - ;; | |
| -"${IRC_USER}, sacrifice"*) | |
| - # Emulate https://threats.kaspersky.com/en/threat/IRC-Worm.DOS.Septic/ | |
| - annna-say "${IRC_CMD_USER}, Your word is my command, Power to satan!" | |
| - ;; | |
| -"${IRC_USER}, please scare me.") | |
| - { | |
| - annna-say "$(halloween)" | |
| - } & | |
| - ;; | |
| +# Emulate https://threats.kaspersky.com/en/threat/IRC-Worm.DOS.Septic/ | |
| +"${IRC_USER}, pray"*) annna-say "${IRC_CMD_USER}, I Obey my master! long live … | |
| +"${IRC_USER}, sacrifice"*) annna-say "${IRC_CMD_USER}, Your word is my command… | |
| +"${IRC_USER}, please scare me"*) annna-say "$(halloween)" & ;; | |
| "${IRC_USER}, how drunk is "*) | |
| { | |
| drunknick="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" \ | |
| @@ -1032,9 +931,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| "${IRC_USER}, how discriminating is "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 30- | sed 's,\t, … | |
| case "$word" in | |
| - *\?) | |
| - word="$(printf "%s\n" "${word}" | cut -c -"$(($(expr length "$… | |
| - ;; | |
| + *\?) word="$(printf "%s\n" "${word}" | cut -c -"$(($(expr length "${wo… | |
| esac | |
| newword="$(discrimination-filter "${word}")" | |
| @@ -1063,24 +960,14 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| "${IRC_USER}, is "*) | |
| aitext="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 7- | sed 's,\t,… | |
| airesult="$(printf "%s\n" "${aitext}" | josuah-ai)" | |
| - if [ -n "${airesult}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER},${airesult}" | |
| - fi | |
| - ;; | |
| -"Ok, ${IRC_USER}"*) | |
| - annna-say "${IRC_CMD_USER}, I am not a consumer device." | |
| - ;; | |
| -"ok, ${IRC_USER}"*) | |
| - annna-say "${IRC_CMD_USER}, I am not a consumer device." | |
| - ;; | |
| + [ -n "${airesult}" ] && annna-say "${IRC_CMD_USER},${airesult}";; | |
| +"Ok, ${IRC_USER}"*) annna-say "${IRC_CMD_USER}, I am not a consumer device.";; | |
| +"ok, ${IRC_USER}"*) annna-say "${IRC_CMD_USER}, I am not a consumer device.";; | |
| "${IRC_USER}, please shoot "*|"${IRC_USER}, plese shoot "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 21-)" | |
| annna-say "${word}, #pewpew gophers://bitreich.org/9/memecache/pewpew.… | |
| ;; | |
| -"${IRC_USER}, please quinq.") | |
| - annna-say "┻━┻ ︵╰(°□°)╯︵ ┻━┻" | |
| - ;; | |
| +"${IRC_USER}, please quinq.") annna-say "┻━┻ ︵╰(°□°)╯︵ ┻�… | |
| "${IRC_USER}, please flip "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 20-)" | |
| updownword="$(updown "${word}")" | |
| @@ -1099,31 +986,16 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| "${IRC_USER}, wtf "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 11-)" | |
| wtfword="$(wtf "${word}" 2>/dev/null)" | |
| - if [ -n "${wtfword}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${wtfword}" | |
| - fi | |
| - ;; | |
| -"${IRC_USER}, please give me a good band name.") | |
| - bandname="$(bandname-gen | shuf | head -n 1)" | |
| - annna-say "${bandname}" | |
| - ;; | |
| -"${IRC_USER}, I feel conspicuous.") | |
| - manifestouri="$(manifesto-gen | bitreich-paste)" | |
| - annna-say "Maybe declare this: ${manifestouri}" | |
| - ;; | |
| -"${IRC_USER}, I am horny.") | |
| - essaypaste="$(bithub-gen)" | |
| - annna-say \ | |
| - "Here is some intellectual porn for you: ${essaypaste}" | |
| + [ -n "${wtfword}" ] && annna-say "${IRC_CMD_USER}, ${wtfword}" | |
| ;; | |
| +"${IRC_USER}, please give me a good band name"*) annna-say "$(bandname-gen | s… | |
| +"${IRC_USER}, I feel conspicuous"*) annna-say "Maybe declare this: $(manifesto… | |
| +"${IRC_USER}, I am horny"*) annna-say "Here is some intellectual porn for you:… | |
| "${IRC_USER}, please turn on "*) | |
| word="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 22-)" | |
| annna-say "☞ ⏻ ${word}" | |
| ;; | |
| -"${IRC_USER}, please turn me on.") | |
| - annna-say "☞ ⏻ ${IRC_CMD_USER}" | |
| - ;; | |
| +"${IRC_USER}, please turn me on"*) annna-say "☞ ⏻ ${IRC_CMD_USER}";; | |
| "${IRC_USER}, I'm game bored.") | |
| gamelink="$(abandonware-random-game)" | |
| if [ -z "${gamelink}" ]; | |
| @@ -1133,21 +1005,15 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, have you tried ${gamelink} ?" | |
| fi | |
| ;; | |
| -"${IRC_USER}, I need a waifu.") | |
| +"${IRC_USER}, I need a waifu"*) | |
| waifuuris="$(waifu-gen)" | |
| - if [ -n "${waifuuris}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${waifuuris}" | |
| - fi | |
| + [ -n "${waifuuris}" ] && annna-say "${IRC_CMD_USER}, ${waifuuris}" | |
| ;; | |
| -"${IRC_USER}, I need an anime.") | |
| +"${IRC_USER}, I need an anime"*) | |
| animeuri="$(anime-gen)" | |
| - if [ -n "${animeuri}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${animeuri}" | |
| - fi | |
| + [ -n "${animeuri}" ] && annna-say "${IRC_CMD_USER}, ${animeuri}" | |
| ;; | |
| -"${IRC_USER}, I'm gopher bored.") | |
| +"${IRC_USER}, I'm gopher bored"*) | |
| randomlink="$(/br/bin/bitreich-lawn-random-link)" | |
| linktype="$(printf "%s\n" "${randomlink}" | cut -d '|' -f1 | cut -c2-)" | |
| linktext="$(printf "%s\n" "${randomlink}" | cut -d '|' -f2)" | |
| @@ -1165,86 +1031,46 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| fi | |
| annna-say "$outtext" | |
| ;; | |
| -"${IRC_USER}, wb.") | |
| - annna-say "${IRC_CMD_USER}, ty! I am so happy to be here. :)" | |
| - ;; | |
| -"${IRC_USER}, I love you!") | |
| - annna-say $'\001ACTION blushes\001' | |
| - ;; | |
| -"${IRC_USER}, bon"*) | |
| - insult="$(bonjour)" | |
| - annna-say "${IRC_CMD_USER}, ${insult} !" | |
| - ;; | |
| -"${IRC_USER}, salut"*) | |
| - annna-say "${IRC_CMD_USER}, Salutations camarade !" | |
| - ;; | |
| -"${IRC_USER}, welcome back.") | |
| - annna-say "${IRC_CMD_USER}, thank you! I am so happy to be here. :)" | |
| - ;; | |
| +"${IRC_USER}, wb"*) annna-say "${IRC_CMD_USER}, ty! I am so happy to be here. … | |
| +"${IRC_USER}, welcome back"*) annna-say "${IRC_CMD_USER}, thank you! I am so h… | |
| +"${IRC_USER}, I love you"*) annna-say $'\001ACTION blushes\001';; | |
| +"${IRC_USER}, bon"*) annna-say "${IRC_CMD_USER}, $(bonjour) !";; | |
| +"${IRC_USER}, salut"*) annna-say "${IRC_CMD_USER}, Salutations camarade !";; | |
| "${IRC_USER}, what's up?") | |
| newsstr="$(ecl -shell /home/solene/gopher/bin/generator.lisp)" | |
| annna-say "$newsstr" | |
| ;; | |
| -"${IRC_USER}, what's down?") | |
| - annna-say "${IRC_CMD_USER}, we all love you." | |
| - ;; | |
| -*"ACTION cancels "*) | |
| +"${IRC_USER}, what's down?") annna-say "${IRC_CMD_USER}, we all love you.";; | |
| +$'\001'"ACTION cancels "*) | |
| mobtarget="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | sed 's,.*ACTION can… | |
| cancel-target "${mobtarget}" | |
| annna-say "${IRC_CMD_USER}, I cancelled ${mobtarget} for you. ( gopher… | |
| ;; | |
| -*"ACTION pokes ${IRC_USER}"*) | |
| - annna-say "$(echo -e '\001')ACTION pokes ${IRC_CMD_USER}$(echo -e '\00… | |
| - ;; | |
| +$'\001'"ACTION pokes ${IRC_USER}"$'\001') annna-say "$(echo -e '\001')ACTION p… | |
| "${IRC_USER}, please show me the mob"*|"${IRC_USER}, what are the mob"*) | |
| canceluri="$(get-cancel-list)" | |
| annna-say "${IRC_CMD_USER}, ${canceluri}" | |
| ;; | |
| -"${IRC_USER}, I feel sick.") | |
| +"${IRC_USER}, I feel sick"*) | |
| newsstr="$(cd /br/gopher/hypochondria && ./hypochondria -s random)" | |
| annna-say "You could have ${newsstr}! Be careful!" | |
| ;; | |
| -*"oh hai"*|*"ohai"*|*"ohhai"*) | |
| - annna-say "${IRC_CMD_USER}, hai! How is your sex life?" | |
| - ;; | |
| -"o/"|"o/ "*|"\o"|"\o "*|"o7"|"o7 "*) | |
| - annna-say "${IRC_CMD_USER}, ${IRC_PRIVMSG_TEXT}" | |
| - ;; | |
| -"\m/"|"\m/ "*) | |
| - annna-say "${IRC_CMD_USER}, ᕦ(ò_óˇ)ᕤ" | |
| - ;; | |
| -*"*waves*"*|*"*wave*"*) | |
| - annna-say "${IRC_CMD_USER}, *wave*" | |
| - ;; | |
| -"twtcs"*|"TWTCS"*) | |
| - annna-say "${IRC_CMD_USER}, maybe: https://constitution.congress.gov/c… | |
| - ;; | |
| -"twss"*|"TWSS"*) | |
| - annna-say "${IRC_CMD_USER}, no, I didn't." | |
| - ;; | |
| -*"cows are nice"*) | |
| - annna-say "${IRC_CMD_USER}, 'Cows are nice, unless you are a blade of … | |
| - ;; | |
| -"${IRC_USER}, please make me a coffee.") | |
| - annna-say "${IRC_CMD_USER}, ☕" | |
| - ;; | |
| -"${IRC_USER}, please tech hype me.") | |
| - techstr="$(tech-hype)" | |
| - annna-say "${techstr}" | |
| - ;; | |
| -"${IRC_USER}, please french hype me.") | |
| - frenchstr="$(french-hype)" | |
| - annna-say "${frenchstr}" | |
| - ;; | |
| +*"oh hai"*|*"ohai"*|*"ohhai"*) annna-say "${IRC_CMD_USER}, hai! How is your se… | |
| +"o/"|"o/ "*|"\o"|"\o "*|"o7"|"o7 "*) annna-say "${IRC_CMD_USER}, ${IRC_PRIVMSG… | |
| +"\m/"|"\m/ "*) annna-say "${IRC_CMD_USER}, ᕦ(ò_óˇ)ᕤ";; | |
| +*"*waves*"*|*"*wave*"*) annna-say "${IRC_CMD_USER}, *wave*";; | |
| +"twtcs"*|"TWTCS"*) annna-say "${IRC_CMD_USER}, maybe: https://constitution.con… | |
| +"twss"*|"TWSS"*) annna-say "${IRC_CMD_USER}, no, I didn't.";; | |
| +*"cows are nice"*) annna-say "${IRC_CMD_USER}, 'Cows are nice, unless you are … | |
| +"${IRC_USER}, please make me a coffee"*) annna-say "${IRC_CMD_USER}, ☕";; | |
| +"${IRC_USER}, please tech hype me"*) annna-say "$(tech-hype)";; | |
| +"${IRC_USER}, please french hype me"*) annna-say "$(french-hype)";; | |
| "${IRC_USER}, please coffee read "*) | |
| readtarget="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -c 27-)" | |
| horostr="$($HOME/scm/bullshit/horoscope)" | |
| annna-say "${readtarget}, ${horostr}" | |
| ;; | |
| -"${IRC_USER}, what's my horoscope?") | |
| - horostr="$($HOME/scm/bullshit/horoscope)" | |
| - annna-say "${IRC_CMD_USER}, ${horostr}" | |
| - ;; | |
| +"${IRC_USER}, what's my horoscope?") annna-say "${IRC_CMD_USER}, $($HOME/scm/b… | |
| "${IRC_USER}, what should I cook"*) | |
| recipestr="$(based.recipe)" | |
| if [ -n "${recipestr}" ]; | |
| @@ -1275,14 +1101,10 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| # puri="$(sacc gopher://parazyd.org/0/tarot.cgi | /br/bin/bitreich-past… | |
| # annna-say "${IRC_CMD_USER}, your future is here: ${puri}" | |
| # ;; | |
| -"${IRC_USER}, haha.") | |
| - { | |
| - # Can take long, so run in background. | |
| +"${IRC_USER}, haha"*) | |
| + { | |
| wuri="$(github-haha)" | |
| - if [ -n "${wuri}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, haha ${wuri}" | |
| - fi | |
| + [ -n "${wuri}" ] && annna-say "${IRC_CMD_USER}, haha ${wuri}" | |
| } & | |
| ;; | |
| "${IRC_USER}, meow"*) | |
| @@ -1301,82 +1123,49 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| fi | |
| annna-say "${IRC_CMD_USER}, ${meows}" | |
| ;; | |
| -"${IRC_USER}, how many memes do you know?") | |
| - annna-say "I know $(hashtagcount) memes: gophers://bitreich.org/1/meme… | |
| - ;; | |
| -"${IRC_USER}, how many people died of corona?") | |
| - annna-say "${IRC_CMD_USER}, too many. :( Please see yourself: gopher:/… | |
| - ;; | |
| -"${IRC_USER}, please show me your memes.") | |
| +"${IRC_USER}, how many memes do you know?") annna-say "I know $(hashtagcount) … | |
| +"${IRC_USER}, please show me your memes"*) | |
| puri="$(printf "%s" "$(hashtags)" | /br/bin/bitreich-paste)" | |
| annna-say "Here are my memes: ${puri}" | |
| ;; | |
| -"${IRC_USER}, please show me the victims.") | |
| +"${IRC_USER}, please show me the victims"*) | |
| puri="$(printf "%s" "$(hashtags)" | grep victim | /br/bin/bitreich-pas… | |
| annna-say "Here are the victims: ${puri}" | |
| ;; | |
| -"${IRC_USER}, please distro-hop with me.") | |
| +"${IRC_USER}, please distro-hop with me"*) | |
| ndistro="$(curl -s 'https://distrowatch.com/dwres.php?resource=popular… | |
| | grep phr2 \ | |
| | sed 's,.*href="\(.*\)".*,\1,' \ | |
| | sort | uniq | shuf -n 1)" | |
| annna-say "How about https://distrowatch.com/${ndistro} ?" | |
| ;; | |
| -"${IRC_USER}, please show me your Macron.") | |
| - annna-say "gophers://bitreich.org/0/ascii/macron.vt" | |
| - ;; | |
| -"${IRC_USER}, release the Kraken!") | |
| - annna-say "Here it is! gophers://bitreich.org/0/memecache/kraken.vt" | |
| - ;; | |
| -"${IRC_USER}, where is your source?") | |
| - annna-say "Here is my precious source: git://bitreich.org/annna " | |
| - ;; | |
| -"${IRC_USER}, release the Quacken!") | |
| - annna-say "Quack Quack! gophers://bitreich.org/9/memecache/release-the… | |
| - ;; | |
| -"${IRC_USER}, be cool.") | |
| +"${IRC_USER}, please show me your Macron"*) annna-say "gophers://bitreich.org/… | |
| +"${IRC_USER}, release the Kraken"*) annna-say "Here it is! gophers://bitreich.… | |
| +"${IRC_USER}, where is your source?") annna-say "Here is my precious source: g… | |
| +"${IRC_USER}, release the Quacken!") annna-say "Quack Quack! gophers://bitreic… | |
| +"${IRC_USER}, be cool"*) | |
| case "$(($RANDOM % 5))" in | |
| - 0) | |
| - annna-say "(⌐■_■)" | |
| - ;; | |
| - 1) | |
| - annna-say "(▰˘◡˘▰)" | |
| - ;; | |
| - 2) | |
| - annna-say "(▀ Ĺ▀ )̄" | |
| - ;; | |
| - 3) | |
| - annna-say "(▀Ĺ▀ )" | |
| - ;; | |
| - *) | |
| - annna-say "I can't be cool! gophers://bitreich.org/9/memecache… | |
| - ;; | |
| + 0) annna-say "(⌐■_■)";; | |
| + 1) annna-say "(▰˘◡˘▰)";; | |
| + 2) annna-say "(▀ Ĺ▀ )̄";; | |
| + 3) annna-say "(▀Ĺ▀ )";; | |
| + *) annna-say "I can't be cool! gophers://bitreich.org/9/memecache/i-ca… | |
| esac | |
| ;; | |
| -"${IRC_USER}, please cheer.") | |
| +"${IRC_USER}, please cheer"*) | |
| case "$(($RANDOM % 2))" in | |
| - 0) | |
| - annna-say '~\o/~' | |
| - ;; | |
| - *) | |
| - annna-say '✺◟( ° ʖ °)◞✺' | |
| - ;; | |
| + 0) annna-say '~\o/~';; | |
| + *) annna-say '✺◟( ° ʖ °)◞✺';; | |
| esac | |
| ;; | |
| -"${IRC_USER}, please give me a fish.") | |
| +"${IRC_USER}, please give me a fish"*) | |
| case "$(($RANDOM % 2))" in | |
| - 0) | |
| - annna-say '<><' | |
| - ;; | |
| - *) | |
| - annna-say '><>' | |
| - ;; | |
| + 0) annna-say '<><';; | |
| + *) annna-say '><>';; | |
| esac | |
| ;; | |
| -"${IRC_USER}, run.") | |
| - annna-say 'ᕕ(ಠ_ಠ)ᕗ' | |
| - ;; | |
| -"${IRC_USER}, be cute.") | |
| +"${IRC_USER}, run"*) annna-say 'ᕕ(ಠ_ಠ)ᕗ';; | |
| +"${IRC_USER}, be cute"*) | |
| case "$(($RANDOM % 4))" in | |
| 0) | |
| annna-say ' (\ /)' | |
| @@ -1410,33 +1199,23 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| ;; | |
| "${IRC_USER}, 8ball "*) | |
| eightballanswer="$(8ball)" | |
| - if [ -n "${eightballanswer}" ]; | |
| - then | |
| - annna-say "${eightballanswer}" | |
| - fi | |
| + [ -n "${eightballanswer}" ] && annna-say "${eightballanswer}" | |
| ;; | |
| "${IRC_USER}, email "*) | |
| findsyou="$(shuf -n 1 "${ANNNA_MODBASE}/finds-you/finds_you.txt")" | |
| - if [ -n "${findsyou}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, I hope this email ${findsyou}" | |
| - fi | |
| + [ -n "${findsyou}" ] && annna-say "${IRC_CMD_USER}, I hope this email … | |
| ;; | |
| "${IRC_USER}, please throw a coin for me.") | |
| case "$((($RANDOM % 2) + 1))" in | |
| - 1) | |
| - annna-say "face" | |
| - ;; | |
| - 2) | |
| - annna-say "number" | |
| - ;; | |
| + 1) annna-say "face";; | |
| + 2) annna-say "number";; | |
| esac | |
| ;; | |
| -"${IRC_USER}, please quantum roll d2 for me.") | |
| +"${IRC_USER}, please quantum roll d2 for me"*) | |
| qroll="$(($(/home/20h/scm/quantum-rng/quantum-rng) + 1))" | |
| annna-say "${IRC_CMD_USER}, ${qroll} [1d2(scores:[${qroll}])]" | |
| ;; | |
| -"${IRC_USER}, please roll "*" for me.") | |
| +"${IRC_USER}, please roll "*" for me"*) | |
| q="${text#* roll }" | |
| q="${q%for*}" | |
| @@ -1449,15 +1228,9 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| dicescore="$(dice "${q}")" | |
| annna-say "${IRC_CMD_USER}, ${dicescore}" | |
| ;; | |
| -"${IRC_USER}, please tell me your favourite flower.") | |
| - annna-say "My favourite flower is the beer flower." | |
| - ;; | |
| -"${IRC_USER}, please tell me your favourite color.") | |
| - annna-say "My favourite color is yellow." | |
| - ;; | |
| -"${IRC_USER}, please clap for me.") | |
| - annna-say "${IRC_CMD_USER}, *clap* *clap* *clap*" | |
| - ;; | |
| +"${IRC_USER}, please tell me your favourite flower"*) annna-say "My favourite … | |
| +"${IRC_USER}, please tell me your favourite color"*) annna-say "My favourite c… | |
| +"${IRC_USER}, please clap for me"*) annna-say "${IRC_CMD_USER}, *clap* *clap* … | |
| "${IRC_USER}, which city does not exist?") | |
| cityuri="$(this-city-does-not-exist)" | |
| if [ -n "${cityuri}" ]; | |
| @@ -1467,48 +1240,22 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, none." | |
| fi | |
| ;; | |
| -"For humanity!") | |
| - annna-say "${IRC_CMD_USER}, for humanity! gophers://bitreich.org/0/mem… | |
| - ;; | |
| -"Hack the planet!") | |
| - annna-say "${IRC_CMD_USER}, hack the planet!" | |
| - ;; | |
| -"Long live gopher!") | |
| - annna-say "${IRC_CMD_USER}, long live gopher!" | |
| - ;; | |
| -":)"|":))"|":)))"|":-)"|":-))"|":-)))"|":--)"|":--))"|":--)))"|":---)"|":----)… | |
| - smileface="$(smile)" | |
| - annna-say -- "${smileface}" | |
| - ;; | |
| -"${IRC_USER}, please dance."|"\\o/"|"\^o^/") | |
| - dancemoves="$(dance-moves-gen)" | |
| - annna-say -- "${dancemoves}" | |
| - ;; | |
| -"${IRC_USER}, let us celebrate!"|"/o/"|"\o\\") | |
| - dancemoves="$(dance-moves-gen -m)" | |
| - annna-say -- "${dancemoves}" | |
| - ;; | |
| -"${IRC_USER}, please egyptian dance."|"${IRC_USER}, let us egyptian celebrate!… | |
| - dancemoves="$(dance-moves-gen -e)" | |
| - annna-say -- "${dancemoves}" | |
| - ;; | |
| -"${IRC_USER}, please stamp this letter for me.") | |
| - annna-say -- "${IRC_CMD_USER}, here: 🖃 " | |
| - ;; | |
| -"${IRC_USER}, please do the graveyard smash.") | |
| +[Ff]"or humanity"*) annna-say "${IRC_CMD_USER}, for humanity! gophers://bitrei… | |
| +[Hh]"ack the planet"*) annna-say "${IRC_CMD_USER}, hack the planet!" ;; | |
| +[Ll]"ong live gopher"*) annna-say "${IRC_CMD_USER}, long live gopher!";; | |
| +":)"|":))"|":)))"|":-)"|":-))"|":-)))"|":--)"|":--))"|":--)))"|":---)"|":----)… | |
| +"${IRC_USER}, please dance."|"\\o/"|"\^o^/") annna-say -- "$(dance-moves-gen)"… | |
| +"${IRC_USER}, let us celebrate!"|"/o/"|"\o\\") annna-say -- "$(dance-moves-gen… | |
| +"${IRC_USER}, please egyptian dance."|"${IRC_USER}, let us egyptian celebrate!… | |
| +"${IRC_USER}, please stamp this letter for me"*) annna-say -- "${IRC_CMD_USER}… | |
| +"${IRC_USER}, please do the graveyard smash"*) | |
| annna-say -- "( つ ・ᴗ・)つ" | |
| annna-say -- "ς ( ・ᴗ・ ς )" | |
| annna-say -- "It did the mash\\ It did the ~~MONSTER MASH~~\\ It was a… | |
| ;; | |
| -"${IRC_USER}, boo."|"${IRC_USER}, boo!") | |
| - annna-say "${IRC_CMD_USER}, 👻" | |
| - ;; | |
| -"${IRC_USER}, W3C."|"${IRC_USER}, w3c.") | |
| - annna-say "${IRC_CMD_USER}, 🕸️ 🕷️ 🕸️" | |
| - ;; | |
| -"${IRC_USER}, pumpkin.") | |
| - annna-say "${IRC_CMD_USER}, 🎃" | |
| - ;; | |
| +"${IRC_USER}, boo"*) annna-say "${IRC_CMD_USER}, 👻";; | |
| +"${IRC_USER}, W3C"*|"${IRC_USER}, w3c"*) annna-say "${IRC_CMD_USER}, 🕸️ �… | |
| +"${IRC_USER}, pumpkin"*) annna-say "${IRC_CMD_USER}, 🎃";; | |
| "${IRC_USER}, trick or treat"*|"${IRC_USER}, treat or trick"*) | |
| annna-say "Wait for it. Old annnama is searching ..." | |
| { | |
| @@ -1524,7 +1271,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "${IRC_CMD_USER}, $(trick-or-treat)" | |
| } & | |
| ;; | |
| -"${IRC_USER}, please dance with me.") | |
| +"${IRC_USER}, please dance with me"*) | |
| if [ $(($RANDOM % 2)) -gt 0 ]; | |
| then | |
| annna-say "I am not that kind of woman." | |
| @@ -1532,69 +1279,33 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "Thank you! Let us dance! :-D" | |
| fi | |
| ;; | |
| -"${IRC_USER}, please tell me who is your favourite pleasure man.") | |
| - annna-say "My favourite pleasure man is of course Gunther!" | |
| - ;; | |
| -"${IRC_USER}, make me a sandwich"*) | |
| - annna-say "No." | |
| - ;; | |
| -"${IRC_USER}, sudo make me a sandwich"*) | |
| - annna-say "Humans are no objects." | |
| - ;; | |
| -"${IRC_USER}, please make me a sandwich"*) | |
| - annna-say "Maybe." | |
| - ;; | |
| -"${IRC_USER}, sudo please make me a sandwich"*) | |
| - annna-say "Here is your sandwich." | |
| - ;; | |
| +"${IRC_USER}, please tell me who is your favourite pleasure man"*) annna-say "… | |
| +"${IRC_USER}, make me a sandwich"*) annna-say "No.";; | |
| +"${IRC_USER}, sudo make me a sandwich"*) annna-say "Humans are no objects.";; | |
| +"${IRC_USER}, please make me a sandwich"*) annna-say "Maybe.";; | |
| +"${IRC_USER}, sudo please make me a sandwich"*) annna-say "Here is your sandwi… | |
| "${IRC_USER}, I feel unsure about my health.") | |
| healthadvice="$(health-advice)" | |
| - if [ -n "${healthadvice}" ]; | |
| - then | |
| - annna-say "${IRC_CMD_USER}, ${healthadvice}" | |
| - fi | |
| - ;; | |
| -"${IRC_USER}, bonjour !") | |
| - annna-say "${IRC_CMD_USER}, bonjour !" | |
| - ;; | |
| -*" pets ${IRC_USER}"*) | |
| - annna-say "${IRC_CMD_USER}, *brrrrr*" | |
| - ;; | |
| -"${IRC_USER}, please give me a penis extension.") | |
| - annna-say "${IRC_CMD_USER}, here: $(penis-extension)" | |
| - ;; | |
| -"${IRC_USER}, please bobbitize me.") | |
| - annna-say "${IRC_CMD_USER}, here: $(bobbitize)" | |
| - ;; | |
| -"${IRC_USER}, please give me a baguette extension.") | |
| - annna-say "${IRC_CMD_USER}, here: $(baguette-extension)" | |
| - ;; | |
| -"${IRC_USER}, please give me an allah extension.") | |
| - annna-say "${IRC_CMD_USER}, here: $(allah-extension)" | |
| - ;; | |
| -"${IRC_USER}, please pull my finger.") | |
| - annna-say "${IRC_CMD_USER}, you are disgusting." | |
| - ;; | |
| -"${IRC_USER}, what's up in Japan?") | |
| - annna-say "${IRC_CMD_USER}, see for yourself: https://nhk3.mov3.co/hls… | |
| - ;; | |
| + [ -n "${healthadvice}" ] && annna-say "${IRC_CMD_USER}, ${healthadvice… | |
| + ;; | |
| +"${IRC_USER}, bonjour !") annna-say "${IRC_CMD_USER}, bonjour !";; | |
| +*" pets ${IRC_USER}"*) annna-say "${IRC_CMD_USER}, *brrrrr*";; | |
| +"${IRC_USER}, please give me a penis extension"*) annna-say "${IRC_CMD_USER}, … | |
| +"${IRC_USER}, please bobbitize me"*) annna-say "${IRC_CMD_USER}, here: $(bobbi… | |
| +"${IRC_USER}, please give me a baguette extension"*) annna-say "${IRC_CMD_USER… | |
| +"${IRC_USER}, please give me an allah extension"*) annna-say "${IRC_CMD_USER},… | |
| +"${IRC_USER}, please pull my finger"*) annna-say "${IRC_CMD_USER}, you are dis… | |
| +"${IRC_USER}, what's up in Japan?") annna-say "${IRC_CMD_USER}, see for yourse… | |
| "${IRC_USER}, please mqtt"*) | |
| mqtturi="$(printf '%s\n' "${IRC_PRIVMSG_TEXT}" | cut -d' ' -f 3)" | |
| case "${mqtturi}" in | |
| - mqtt:*) | |
| - #mqtt:// full URI specified | |
| - ;; | |
| - *) | |
| - #mqtt/sensor specified | |
| - mqtturi="mqtts://bitreich:oogui3queex&[email protected]/${… | |
| - ;; | |
| + mqtt:*);; #mqtt:// full URI specified | |
| + *) mqtturi="mqtts://bitreich:oogui3queex&[email protected]/${mqttu… | |
| esac | |
| msg="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | cut -d' ' -f 4-)" | |
| printf "${msg}\n" | mosquitto_pub -L "${mqtturi}" -l | |
| ;; | |
| -*"zuckerberg"*|*"Zuckerberg"*) | |
| - annna-say "${IRC_CMD_USER}, did you mean gophers://bitreich.org/9/meme… | |
| - ;; | |
| +*[Zz]"uckerberg"*) annna-say "${IRC_CMD_USER}, did you mean gophers://bitreich… | |
| "${IRC_USER}, please pick one of: "*) | |
| pick="$(printf '%s\n' "${IRC_PRIVMSG_TEXT}" \ | |
| | sed 's/.*please pick one of: //' \ | |
| @@ -1768,13 +1479,9 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| outfile=$(blender-effect $args) | |
| annna-say "${IRC_CMD_USER}, gophers://bitreich.org/I/memecache/3d/${ou… | |
| ;; | |
| -"${IRC_USER}, droggelbecher"*) | |
| - # https://ednaundharvey.fandom.com/de/wiki/Droggelbecher | |
| - annna-say "${IRC_CMD_USER}, Droggelbecher!" | |
| - ;; | |
| -"${IRC_USER}, thanks"*|"${IRC_USER}, thx"*) | |
| - annna-say "${IRC_CMD_USER}, you're welcome." | |
| - ;; | |
| +# https://ednaundharvey.fandom.com/de/wiki/Droggelbecher | |
| +"${IRC_USER}, droggelbecher"*) annna-say "${IRC_CMD_USER}, Droggelbecher!";; | |
| +"${IRC_USER}, thanks"*|"${IRC_USER}, thx"*) annna-say "${IRC_CMD_USER}, you're… | |
| "${IRC_USER}, please simulate "*" simulator"*) | |
| q="${IRC_PRIVMSG_TEXT#* please simulate }" | |
| q="${q% simulator*}" | |
| @@ -1805,9 +1512,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| curi="$(bitreichcoin "$q" | /br/bin/bitreich-paste)" | |
| annna-say "${IRC_CMD_USER}, please don't spend it all at once: ${curi}" | |
| ;; | |
| -"${IRC_USER}, please hug me.") | |
| - annna-say "$(echo -e '\001')ACTION hugs ${IRC_CMD_USER}$(echo -e '\001… | |
| - ;; | |
| +"${IRC_USER}, please hug me.") annna-say "$(echo -e '\001')ACTION hugs ${IRC_C… | |
| "${IRC_USER}, please hug "*" for me.") | |
| huggee="${IRC_PRIVMSG_TEXT#* please hug }" | |
| huggee="${huggee% for me*}" | |
| @@ -1816,26 +1521,15 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-say "$(echo -e '\001')ACTION hugs ${huggee}$(echo -e '\0… | |
| fi | |
| ;; | |
| -"${IRC_USER}, how many fucks were given?") | |
| - annna-say "${IRC_CMD_USER}, current fucks given: 0.0" | |
| - ;; | |
| -"${IRC_USER}, please slam the door.") | |
| - annna-say "${IRC_CMD_USER}, *BANG*" | |
| - ;; | |
| -"${IRC_USER}, what is my credit score?") | |
| - annna-say "${IRC_CMD_USER}, your credit score is 0." | |
| - ;; | |
| +"${IRC_USER}, how many fucks were given?") annna-say "${IRC_CMD_USER}, current… | |
| +"${IRC_USER}, please slam the door.") annna-say "${IRC_CMD_USER}, *BANG*";; | |
| +"${IRC_USER}, what is my credit score?") annna-say "${IRC_CMD_USER}, your cred… | |
| "${IRC_USER}, please give me a cookie.") | |
| cookie="$(cookie)" | |
| - if [ -n "${cookie}" ]; | |
| - then | |
| - annna-say "$(echo -e '\001')ACTION gives ${IRC_CMD_USER} a ${c… | |
| - fi | |
| - ;; | |
| -"${IRC_USER}, please help.") | |
| - annna-say -c "${IRC_CMD_USER}" "See git://bitreich.org/annna for my co… | |
| + [ -n "${cookie}" ] && annna-say "$(echo -e '\001')ACTION gives ${IRC_C… | |
| ;; | |
| -"${IRC_USER}, please meme meme meme me.") | |
| +"${IRC_USER}, please help"*) annna-say -c "${IRC_CMD_USER}" "See git://bitreic… | |
| +"${IRC_USER}, please meme meme meme me"*) | |
| randomtag=2 | |
| while [ $randomtag -gt 0 ]; | |
| do | |
| @@ -1847,9 +1541,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| [ -z "${tagname}" ] && tagname="${tag}" && continue | |
| taguri="${tag}" | |
| done | |
| - | |
| annna-say "${tagname}: ${taguri}" | |
| - | |
| randomtag=$((randomtag - 1)) | |
| done | |
| ;; | |
| @@ -1860,7 +1552,7 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| taguri="$(printf "%s\n" "${tagline}" | cut -d ' ' -f 2-)" | |
| annna-say "${tagname}: ${taguri}" | |
| ;; | |
| -"${IRC_USER}, TIL "*) | |
| +"${IRC_USER}, TIL "*|"${IRC_USER}, til "*) | |
| minimum_learned_len=12 | |
| offset=$(( ${#IRC_USER} + 6 )) | |
| learned="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" \ | |
| @@ -1998,8 +1690,7 @@ do | |
| done | |
| case "${IRC_PRIVMSG_TEXT,,}" in | |
| -*\#nospoil*) | |
| - ;; | |
| +*\#nospoil*);; | |
| *rfc[0-9]*) | |
| rfcname="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | sed 's,.*\(rfc[0-9]*\… | |
| annna-say "${rfcname}: ftp://ftp.rfc-editor.org/in-notes/${rfcname}.tx… | |
| @@ -2012,18 +1703,12 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| shametext="$(printf "%s\n" "${IRC_PRIVMSG_TEXT}" | sed 's,.* \(.*-sham… | |
| shame "${shametext}" >/dev/null | |
| ;; | |
| -*"arma is a bitch"*) | |
| - annna-say "${IRC_CMD_USER}, I object! Karma is a nice girl!" | |
| - ;; | |
| -"score "*) | |
| - # For referee scoring. | |
| - ;; | |
| +*"arma is a bitch"*) annna-say "${IRC_CMD_USER}, I object! Karma is a nice gir… | |
| +# For referee scoring. | |
| +"score "*);; | |
| *++|*--|*-=?|*+=?|*+=-?|*-=-?) | |
| karmatext="$(karma "${IRC_PRIVMSG_TEXT}")" | |
| - if [ -n "$karmatext" ]; | |
| - then | |
| - annna-say "karma: ${karmatext}" | |
| - fi | |
| + [ -n "$karmatext" ] && annna-say "karma: ${karmatext}" | |
| ;; | |
| esac | |
| @@ -2044,15 +1729,9 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| annna-wakeup | |
| annna-say "Good morning BITREICH!" | |
| ;; | |
| -"${IRC_USER}, can you show me the uptime please?") | |
| - annna-say "$(hostname) uptime: $(uptime)" | |
| - ;; | |
| -"${IRC_USER}, please show me the load.") | |
| - annna-say "$(hostname) load: $(LANG=C uptime | sed 's,.*load average: … | |
| - ;; | |
| -"${IRC_USER}, please give me the count of online users.") | |
| - annna-say "$(hostname): $(who -q | tail -n 1 | cut -d'=' -f 2)" | |
| - ;; | |
| +"${IRC_USER}, can you show me the uptime please?") annna-say "$(hostname) upti… | |
| +"${IRC_USER}, please show me the load.") annna-say "$(hostname) load: $(LANG=C… | |
| +"${IRC_USER}, please give me the count of online users.") annna-say "$(hostnam… | |
| "${IRC_USER}, please update the phlog index.") | |
| phlog-index > /dev/null 2>&1 | |
| annna-say "Thanks! Your request has been fulfilled with the quickness!… | |
| @@ -2073,12 +1752,8 @@ case "${IRC_PRIVMSG_TEXT}" in | |
| case "${IRC_PRIVMSG_TEXT}" in | |
| *++|*--|*-=?|*+=?|*+=-?|*-=-?|*-=??|*+=??|*-=-??|*-=65536*) | |
| scoretext="$(brcon-score "${IRC_PRIVMSG_TEXT}")" | |
| - if [ -n "$scoretext" ]; | |
| - then | |
| - annna-say "brcon score: ${scoretext}" | |
| - fi | |
| + [ -n "$scoretext" ] && annna-say "brcon score: ${scoretext}" | |
| ;; | |
| - esac | |
| - ;; | |
| + esac;; | |
| esac | |
| diff --git a/annna-start b/annna-start | |
| @@ -1,13 +1,6 @@ | |
| #!/bin/sh | |
| -if [ $# -lt 1 ]; | |
| -then | |
| - printf "usage: %s cfgdir [server ...]\n" "$(basename "$0")" >&2 | |
| - exit 1 | |
| -fi | |
| - | |
| -export ANNNA_BASE="$1" | |
| -shift 1 | |
| +[ -z "${ANNNA_BASE}" ] && printf "Please set \$ANNNA_BASE.\n" >&2 && exit 1 | |
| [ ! -d "${ANNNA_BASE}" ] && printf "%s not a directory.\n" "${ANNNA_BASE}" >&2… | |
| [ ! -e "${ANNNA_BASE}/binbase" ] && printf "No /binbase exists.\n" >&2 && exit… | |
| @@ -29,6 +22,11 @@ touch running | |
| if [ $# -gt 1 ]; | |
| then | |
| + if [ "$1" = "-h" ]; | |
| + then | |
| + printf "usage: %s [server ...]\n" "$(basename "$0")" >&2 | |
| + exit 1 | |
| + fi | |
| servers="$@" | |
| else | |
| servers="$(find . -maxdepth 1 -type d | cut -c 3-)"; | |
| diff --git a/annna-stop b/annna-stop | |
| @@ -3,14 +3,7 @@ | |
| # Dare you to execute this script! You are cruel! | |
| # | |
| -if [ $# -lt 1 ]; | |
| -then | |
| - printf "usage: %s cfgdir [server]\n" "$(basename "$0")" >&2 | |
| - exit 1 | |
| -fi | |
| - | |
| -export ANNNA_BASE="$1" | |
| -shift 1 | |
| +[ -z "${ANNNA_BASE}" ] && printf "Please set \$ANNNA_BASE.\n" >&2 && exit 1 | |
| [ ! -d "${ANNNA_BASE}" ] && printf "%s not a directory.\n" "${ANNNA_BASE}" >&2… | |
| [ ! -e "${ANNNA_BASE}/binbase" ] && printf "No /binbase exists.\n" >&2 && exit… | |
| @@ -26,6 +19,11 @@ export PATH="$PATH:${ANNNA_BINBASE}" | |
| cd "${ANNNA_BASE}" | |
| if [ $# -gt 1 ]; | |
| then | |
| + if [ "$1" = "-h" ]; | |
| + then | |
| + printf "usage: %s [server ...]\n" "$(basename "$0")" >&2 | |
| + exit 1 | |
| + fi | |
| servers="$@" | |
| else | |
| servers="$(find . -maxdepth 1 -type d | cut -c 3-)" |