Introduction
Introduction Statistics Contact Development Disclaimer Help
Many changes: * No excess flood. * Checker reworked. * Debugging reworked. - an…
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit bc22021f5895ec90dda9183e932989364fbe0f63
parent 268d613940d5dee85d90753e1d0ae8e0b803e5b2
Author: Annna Robert-Houdin <[email protected]>
Date: Sun, 18 Mar 2018 15:16:13 +0100
Many changes:
* No excess flood.
* Checker reworked.
* Debugging reworked.
Diffstat:
M annna-start-checker | 2 ++
M annna-start-checker-dbg | 10 ++++------
M annna-start-main | 5 +++++
M annna-start-services | 23 ++++++++++++++++++++++-
M phlog-index | 2 ++
5 files changed, 35 insertions(+), 7 deletions(-)
---
diff --git a/annna-start-checker b/annna-start-checker
@@ -5,6 +5,7 @@
export PATH="$PATH:/home/annna/bin"
+{
while /bin/true;
do
# Is annna still in her world?
@@ -18,4 +19,5 @@ do
sleep 5
done
+} &
diff --git a/annna-start-checker-dbg b/annna-start-checker-dbg
@@ -5,8 +5,6 @@
export PATH="$PATH:/home/annna/bin"
-logfile="/home/annna/output.log"
-
while /bin/true;
do
# Is annna still in her world?
@@ -14,12 +12,12 @@ do
if [ -z "$pid" ];
then
- annna-stop-services >/dev/null 2>&1
- annna-start-main 2>&1 \
- | grep -v -e ' PRIVMSG ' -e ' JOIN ' -e ' PART ' \
- >> "$logfile"
+ printf "checker: Starting annna.\n"
+ sh -x annna-stop-services
+ sh -x annna-start-main
fi
+ printf "checker: sleeping 5 seconds.\n"
sleep 5
done
diff --git a/annna-start-main b/annna-start-main
@@ -37,6 +37,11 @@ done
## Waiting for the motd to have ended so we can send something.
while [ -z "$(grep "End of /MOTD command" $HOME/irc/chat.freenode.net/out)" ];
do
+ if [ -n "$(grep "Nickname is already in use" $HOME/irc/chat.freenode.n…
+ then
+ exit 1
+ fi
+
sleep 0.5
done
diff --git a/annna-start-services b/annna-start-services
@@ -7,7 +7,7 @@
export PATH="$PATH:/home/annna/bin"
# Bitreich members who are allowed to run certain commands.
-brmembers="__20h__ Evil_Bob chripo posativ quinq stateless solene josuah"
+brmembers="__20h__ Evil_Bob chripo posativ quinq stateless solene josuah paraz…
botname="annna"
iibase="/home/annna/irc/chat.freenode.net"
@@ -70,6 +70,27 @@ chmod o+w "$HOME/irc/chat.freenode.net/#bitreich-radio/in"
[ $ismember -lt 1 ] && continue
[ "$user" = "${botname}" ] && continue
+
+ if [ "${text}" = "${botname}, be cool." ];
+ then
+ case "$(($RANDOM % 4))" in
+ 0)
+ annna-say -c "#bitreich-en" "(⌐■_■)"
+ ;;
+ 1)
+ annna-say -c "#bitreich-en" "(▰˘◡˘▰)"
+ ;;
+ 2)
+ annna-say -c "#bitreich-en" "(▀ Ĺ▀ )̄"
+ ;;
+ *)
+ annna-say -c "#bitreich-en" "(▀Ĺ▀ )"
+ ;;
+ esac
+
+ continue;
+ fi
+
if [ "${text}" = "${botname}, can you show me the uptime pleas…
then
annna-say -c "#bitreich-en" "$(hostname) uptime: $(upt…
diff --git a/phlog-index b/phlog-index
@@ -106,6 +106,8 @@ then
annna-say -c "$ircchans" \
"$(printf "%s – »%s« by %s gopher://bitreich.org/0…
"$tstamp" "$title" "$user" "$gphpth")"
+ # Case against excess flood.
+ sleep 2
done
fi
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.