+/^headshot [Cc]hristmas/ {
+ say(".load Christmas")
+ say(".jingle")
+ say(".unload Christmas")
+}
+
+FROM == "rhnoise" && $2 == "slaps" && $3 == NICK {
+ say(".spin")
+}
+
+/^[Aa]nd now[.,]/ {
+ say("And now...");
+ say("THE LARCH");
+}
+
+/(for what|that for)\?$/ {
+ say("For great justice!");
+}
+
+/\<nazi/ {
+ say("And now it's...");
+ say("Springtime for Hitler and Germany!");
+}
+
+/^.drank mauchter/ {
+ if (!drank) {
+ system("sleep " 2)
+ say("\x02MD 20/20\x0f - \x02Morgen David\x0f - \x02Under an overpass\x0f - ***** (3 minutes ago)");
+ }
+ drank=1
+}
+
+# God damn commands
+FROM == "rhnoise" && load_mod {
+ say(".load " load_mod)
+ say("rhnoise: You slag!")
+}
+// {
+ load_mod = ""
+}
+(TO == "rhnoise" && /^load \w+/) ||
+(DST == "#rhniose" && /^\.load [a-z]\w+/) {
+ gsub(/[^a-zA-Z0-9_]/, " ")
+ load_mod = toupper(substr($2,1,1)) substr($2,2);
+}
+
+(DST == "#rhnoise" && /^\.line /) {
+ sub(/\./, "!");
+ say($0);
+ say("scalawag: You slag!")
+}
+
+(DST == "#rhnoise" && /^\.qdb 268$/) {
+ say(".diediedie");
+ next
+}
+(DST == "#rhnoise" && /\.qdb *268/) {
+ say(".slap " FROM);
+ next
+}
+
+# Decrementer
+BEGIN {
+ user_scores[0] = 1;
+ delete user_scores
+}
+
+/^\.(scores|scoreboard)$/ {
+ delete user_scores
+}
+
+FROM == "rhnoise" && !length(user_scores) {
+ if (split(MSG, _parts, /, /)) {
+ for (_i=1; _i<=length(_parts); _i++) {
+ split(_parts[_i], _tmp, ": ");
+ user_scores[_i]["user"] = _tmp[1];
+ user_scores[_i]["score"] = _tmp[2];
+ }
+ }
+}
+
+length(user_scores) &&
+tolower($0) ~ /\<nuclear launch detected\>/ {
+ _count = 0;
+ for (_i=1; _i<=length(user_scores); _i++) {
+ _user = user_scores[_i]["user"];
+ _score = user_scores[_i]["score"];
+ if (_user in USERS) continue
+ if (_score == 1) { say(_user "--"); _count++; }
+ if (_score == -1) { say(_user "++"); _count++; }
+ }
+ if (_count) {
+ delete user_scores;
+ say(".scores");
+ } else {
+ say("looks like you're safe.. for now..");
+ }
+}
+
+# Vote relay
+DST != "#rhnoise" && DST != NICK &&
+/\<[a-zA-Z0-9_]{3,16}(\+\+|--)/ {
+ say("#rhnoise", "(" DST ") " FROM ": " MSG);
+}
+
+# Fun operators
+function bang(a, b) {
+ if (a=="nan") return "nan";
+ if (b=="nan") return "nan";
+ if (a==b) return "nan";
+ if (a==0) return "+0";
+ if (b==0) return "-0";
+ return 1/(1/a - 1/b);
+}
+
+/^ *[+-]?[0-9]*\.?[0-9]+( *\? *[+-]?[0-9]*\.?[0-9]+)+ *$/ {
+ gsub(/?/, " ");
+ _num = $1+0;
+ for (_i=2; _i<=NF; _i++)
+ _num = bang(_num, $_i+0);
+ reply(_num);