summaryrefslogtreecommitdiff
path: root/bin/ii-answer
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ii-answer')
-rwxr-xr-xbin/ii-answer11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/ii-answer b/bin/ii-answer
index de06c73..b16f821 100755
--- a/bin/ii-answer
+++ b/bin/ii-answer
@@ -174,6 +174,17 @@ find "${irc_dir}" \
irc_say "${channel}" 'copy'
fi
fi
+ # answer "bug/fs32 <number>"
+ regex='^\S\+ <\(\S\+\)> '"${prefix}"'!\?\([Bb]ug\|[Ff][Ss]\)\(32\)\? \([0-9]\+\)$'
+ if grep -q "${regex}" "${out_file}"; then
+ sed -i '
+ s@'"${regex}"'@\1: https://bugs.archlinux32.org/task/\4@
+ T
+ w /dev/stdout
+ d
+ ' "${out_file}" | \
+ irc_say "${channel}" 'copy'
+ fi
if [ -z "${channel%%#*}" ]; then
# answer "Shut up!"
regex='^\S\+ <\S\+> \(.* \)\?[Ss][Hh][Uu][Tt] \?[Uu][Pp]'