index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-04-16 21:31:47 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-04-16 21:32:04 +0200 |
commit | 809cbd113232eee77dd5a73520bb0608d7a00046 (patch) | |
tree | 636cd81c7726dd9c7ecffd56ac48a7cf42b3149c /bin/ii-connect | |
parent | 7dd3fc81fd48e5b72c7f7b3c090dea9f65553fe2 (diff) |
-rwxr-xr-x | bin/ii-connect | 21 |
diff --git a/bin/ii-connect b/bin/ii-connect index 030dd87..ca8ea99 100755 --- a/bin/ii-connect +++ b/bin/ii-connect @@ -49,6 +49,27 @@ if [ "$1" = 'watch' ]; then ) fi done_something=false + welcome_user_regex='^\S\+ -!- \(abaumann\|deep42thought\|tyzoid\)(.* has joined \S\+$' + new_users=$( + sed -n ' + s/'"${welcome_user_regex}"'/\1/ + T + p + ' "${irc_dir}/#archlinux32/out" | \ + sort -u + ) + if [ -n "${new_users}" ]; then + sed -i ' + /'"${welcome_user_regex}"'/ d + ' "${irc_dir}/#archlinux32/out" + done_something=true + printf '%s\n' "${new_users}" | \ + sed ' + s/^/Hi / + s/$/!/ + ' | \ + irc_say + fi find "${irc_dir}" \ -type f \ -name 'out' \ |