Add command to show number of known memes. - annna - Annna the nice friendly bo… | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit 1ba8cea1c19d957ef3d8d1bd5629aea9e0b69887 | |
parent a6dcadfdfe85e7056b35f76ff25773a2d9fe43a6 | |
Author: Annna Robert-Houdin <[email protected]> | |
Date: Sat, 28 Dec 2019 23:08:00 +0100 | |
Add command to show number of known memes. | |
Diffstat: | |
M annna-start-services | 15 ++++++++++++++- | |
1 file changed, 14 insertions(+), 1 deletion(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -19,9 +19,14 @@ botname="annna" | |
iiroot="/home/annna/irc" | |
iibase="/home/annna/irc/chat.freenode.net" | |
modbase="/home/annna/bin/modules/" | |
+hashtagfile="${modbase}/hashtags/hashtags.txt" | |
hashtags() { | |
- cat ${modbase}/hashtags/hashtags.txt 2>/dev/null | |
+ cat ${hashtagfile} 2>/dev/null | |
+} | |
+ | |
+hashtagcount() { | |
+ wc -l ${hashtagfile} | cut -d' ' -f 1 | |
} | |
# Permissions | |
@@ -333,6 +338,12 @@ then | |
continue; | |
fi | |
+ if [ "${text}" = "${botname}, how many memes do you know?" ]; | |
+ then | |
+ annna-say -c "#bitreich-en" "I know $(hashtagcount) me… | |
+ continue; | |
+ fi | |
+ | |
if [ "${text}" = "${botname}, can you show me the uptime pleas… | |
then | |
annna-say -c "#bitreich-en" "$(hostname) uptime: $(upt… | |
@@ -427,6 +438,8 @@ then | |
if [ "${text}" = "${botname}, please help." ]; | |
then | |
# TODO: Add multiple line support to annna-say -c(1) w… | |
+ annna-say -c "${user}" "�how many memes do you know?«… | |
+ sleep 0.5 | |
annna-say -c "${user}" "»can you show me the uptime p… | |
sleep 0.5 | |
annna-say -c "${user}" "»please show me the load, ${u… |