]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - api/log.php
Log view: don't redraw when fetching 1000 log entries.
[irc/unrealircd/unrealircd-webpanel.git] / api / log.php
CommitLineData
0ba71cfd
BM
1<?php
2
3require_once('common_api.php');
4
5if (!$rpc)
6 die();
7
8/* Basically everything ;) */
7bfda0e1
BM
9
10$response = $rpc->log()->getAll();
11if ($response !== false)
12{
13 /* Only supported in later UnrealIRCd versions */
60ea42bf 14 $cnt = 0;
7bfda0e1 15 foreach($response as $r)
60ea42bf
BM
16 {
17 $r = (ARRAY)$r;
18 $cnt++;
19 if (($cnt % 100) != 0)
20 $r["sync_option"] = "no_sync";
7bfda0e1 21 send_sse($r);
60ea42bf 22 }
7bfda0e1
BM
23}
24
60ea42bf
BM
25$r = ["sync_option"=>"sync_now"];
26send_sse($r);
27
0ba71cfd 28api_log_loop(["all", "!debug"]);