From 620fd6704a7e00c4a5babbb7684d104f456585cf Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Fri, 25 May 2018 08:54:11 +0300 Subject: [PATCH] add undo-registered.bash --- irc/piraatit/undo-registered.bash | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 irc/piraatit/undo-registered.bash diff --git a/irc/piraatit/undo-registered.bash b/irc/piraatit/undo-registered.bash new file mode 100755 index 0000000..e1cea45 --- /dev/null +++ b/irc/piraatit/undo-registered.bash @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# Copied from https://stackoverflow.com/a/8880633 except the nicks + +## declare an array variable +declare -a arr=("#aaltopiraatit" "#grafiikka" "#hame" "#helsinki" "#hepihalko" "#kaakko" "#keski-suomi" "#mediaseuranta" "#pinu_hallitus" "#piraatit" "#piraattinuoret" "#piraattipuolue" "#piraattivpn" "#pirkanmaa" "#ppfi" "#sateenkaaripiraatit" "#sivusto" "#toiminta" "#tyoryhmaorganisaatiomalli" "#uusimaa" "#vaaliteltta" "#varainhankinta" "#varsinais-suomi" "#verkkopalvelut" "#mikaela" ) + +## now loop through the above array +for i in "${arr[@]}" +do + echo "/msg ChanServ flags $i \$registered -VA" + # or do whatever with individual element of the array +done + +## now loop through the above array +for i in "${arr[@]}" +do + echo "/msg ChanServ flags $i *!*@gateway/bridge/matrix/diasp.in -VA" + # or do whatever with individual element of the array +done + +# You can access them using echo "${arr[0]}", "${arr[1]}" also