]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/blame - api/log.php
Fix setting zlines on idents, reported by Jellis
[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
27fba7fa
BM
8/* Filter - almost everything... */
9$log_list = ["all", "!debug"];
10/* Add these as well, they are not logged by default
11 * in the memory log either. See
12 * https://github.com/unrealircd/unrealircd/commit/45342c2d33968178cd07a12cd6fdc4e65b604134
13 * Added here separately because we may want to make
14 * this an option...
15 */
16array_push($log_list,
17 "!join.LOCAL_CLIENT_JOIN",
18 "!join.REMOTE_CLIENT_JOIN",
19 "!part.LOCAL_CLIENT_PART",
20 "!part.REMOTE_CLIENT_PART",
21 "!kick.LOCAL_CLIENT_KICK",
22 "!kick.REMOTE_CLIENT_KICK",
23);
7bfda0e1 24
4d3fa51f 25$response = $rpc->log()->getAll($log_list);
7bfda0e1
BM
26if ($response !== false)
27{
28 /* Only supported in later UnrealIRCd versions */
60ea42bf 29 $cnt = 0;
7bfda0e1 30 foreach($response as $r)
60ea42bf
BM
31 {
32 $r = (ARRAY)$r;
33 $cnt++;
34 if (($cnt % 100) != 0)
35 $r["sync_option"] = "no_sync";
7bfda0e1 36 send_sse($r);
60ea42bf 37 }
7bfda0e1
BM
38}
39
60ea42bf
BM
40$r = ["sync_option"=>"sync_now"];
41send_sse($r);
42
27fba7fa 43api_log_loop($log_list);