return new Rpc($this);
}
+ public function stats(): Stats
+ {
+ return new Stats($this);
+ }
+
public function user(): User
{
return new User($this);
{
return new Spamfilter($this);
}
+
public function nameban(): NameBan
{
return new NameBan($this);
}
+
public function server(): Server
{
return new Server($this);
}
+
public function serverbanexception(): ServerBanException
{
return new ServerBanException($this);
}
+
public function log(): Log
{
return new Log($this);
--- /dev/null
+<?php
+
+namespace UnrealIRCd;
+
+use Exception;
+use stdClass;
+
+class Stats
+{
+
+ public Connection $connection;
+
+ public function __construct(Connection $conn)
+ {
+ $this->connection = $conn;
+ }
+
+ /**
+ * Get basic statistical information: user counts, channel counts, etc.
+ *
+ * @return stdClass|array|bool
+ */
+ public function get(int $object_detail_level=1): stdClass|array|bool
+ {
+ $response = $this->connection->query('stats.get', [
+ 'object_detail_level' => $object_detail_level,
+ ]);
+ }
+}