Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix adc's new tag parsing patch to work and fit old style. - annna - Annna the …
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
commit 99c08878d8c6c5460b7615776bde2bda054ca444
parent 08482dd4d9ee32d6c664d729c243f971d8882a1a
Author: Annna Robert-Houdin <[email protected]>
Date: Fri, 13 Nov 2020 16:42:34 +0100
Fix adc's new tag parsing patch to work and fit old style.
Diffstat:
M annna-start-services | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/annna-start-services b/annna-start-services
@@ -17,7 +17,7 @@ iiroot="/home/annna/irc"
iibase="/home/annna/irc/chat.freenode.net"
modbase="/home/annna/bin/modules/"
hashtagfile="${modbase}/hashtags/hashtags.txt"
-print_n_hashtags=1
+printnhashtags=2
hashtags() {
cat ${hashtagfile} 2>/dev/null
@@ -657,7 +657,7 @@ annna_common() {
randomtag=$(($randomtag - 1))
done
else
- printf '%s' "$text" | awk -v taglimit="$print_n_hashtags" '
+ printf '%s' "$text" | awk -v taglimit="$printnhashtags" '
{
if ($0 ~ /#/ && $0 !~ /#nospoil/) {
for (i = 1; i <= NF; i++) {
@@ -672,9 +672,11 @@ annna_common() {
if (k++ < taglimit)
print tags[tag]
}
- }' | while read -r tag; do
- tagline="$(grep "${tag} " "${tagfile}")"
+ }' | while read -r tag;
+ do
+ tagline="$(grep "${tag} " "${hashtagfile}")"
annna-say -c "${channel}" "${tagline% *}: ${tagline#* …
+ done
fi
# Membership Level.
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.