push notifications to IRC #exim-builds
[buildfarm-server.git] / cgi-bin / register.pl
index 80663b67aefb6ad09f9751bf7950ff38b2ce718a..808cd8938af5f379b6dbc0770c6a0c9f68a55bf3 100755 (executable)
@@ -158,3 +158,16 @@ print $fh "\n\nName: $dummyname\n",
     "Comp: $comp: $compv\n",
     "Owner: $owner <$email>\n";
 $fh->close;
+
+use HTTP::Tiny;
+use JSON::PP;
+HTTP::Tiny->new(timeout => 5)->post(
+    'http://127.0.0.1:2567/api/message', {
+        headers => {'content-type' => 'application/json'},
+        content => encode_json({
+            gateway => 'exim-builds',
+            username => '',
+            text => "[new application] os: $os ($osv); arch: $arch; comp: $comp ($compv)",
+        }),
+    }
+);