]> Pileus Git - ~andy/rhawk/blobdiff - rhawk
Add vote relay
[~andy/rhawk] / rhawk
diff --git a/rhawk b/rhawk
index 83be8071f68a2c6693cbd07948c7fe0822f10833..58ea55e710ae5c78d06456064dddaaf24424073d 100755 (executable)
--- a/rhawk
+++ b/rhawk
@@ -9,7 +9,7 @@
 BEGIN {
        json_load("var/login.json",     login);
        json_load("var/nounicode.json", nounicode);
-       json_load("var/nocolor.json",   nocolors);
+       json_load("var/nocolor.json",   nocolor);
 
        OWNER = login["owner"];
 
@@ -22,7 +22,7 @@ BEGIN {
        delete login
 
        if (FIRST) {
-               join("#rhnoise")
+               join("#rhtest")
                join("#rhspades")
                join("#sfvlug")
        }
@@ -202,6 +202,16 @@ TO == NICK && /^\.?fortune/     {
        next
 }
 
+/\<[Bb][Oo][Ff][Hh]\>/ {
+       _cmd = "fortune bofh-excuses"
+       _cmd | getline _fortune
+       _cmd | getline _fortune
+       _cmd | getline _fortune
+       close(_cmd)
+       say(_fortune)
+       next
+}
+
 # Morse code
 BEGIN {
        morse["/"      ] = " "
@@ -349,6 +359,15 @@ FROM == "rhnoise" && $2 == "slaps" && $3 == NICK {
        say("THE LARCH");
 }
 
+/(for what|that for)\?$/ {
+       say("For great justice!");
+}
+
+/\<nazi/ {
+       say("And now it's...");
+       say("Springtime for Hitler and Germany!");
+}
+
 # God damn commands
 FROM == "rhnoise" && load_mod {
        say(".load " load_mod)
@@ -415,6 +434,11 @@ tolower($0) ~ /\<nuclear launch detected\>/ {
        }
 }
 
+# Vote relay
+DST != "#rhnoise" && /\<[a-zA-Z0-9_]{3,16}(\+\+|--)/ {
+       say("#rhnoise", "(" DST ") " FROM ": " MSG);
+}
+
 # Misc
 { fflush("") }