]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blobdiff - api/log.php
Logs: show search pane (on desktop)
[irc/unrealircd/unrealircd-webpanel.git] / api / log.php
index ebc8fffecafb24e5b091adbd4d4dae2ebcf67fdb..fdce5918974c525f0dc695cc97d94610e26f7130 100644 (file)
@@ -6,4 +6,23 @@ if (!$rpc)
     die();
 
 /* Basically everything ;) */
     die();
 
 /* Basically everything ;) */
+
+$response = $rpc->log()->getAll();
+if ($response !== false)
+{
+    /* Only supported in later UnrealIRCd versions */
+    $cnt = 0;
+    foreach($response as $r)
+    {
+        $r = (ARRAY)$r;
+        $cnt++;
+        if (($cnt % 100) != 0)
+            $r["sync_option"] = "no_sync";
+        send_sse($r);
+    }
+}
+
+$r = ["sync_option"=>"sync_now"];
+send_sse($r);
+
 api_log_loop(["all", "!debug"]);
 api_log_loop(["all", "!debug"]);