X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-rpc-php.git/blobdiff_plain/3162596545e34882f6e0f6b09b61b2c3d0da206c..101a298c6b6bed0ef6191cccbbad9358fb641746:/lib/Channel.php diff --git a/lib/Channel.php b/lib/Channel.php index 2a3f9e5..7a6a68e 100644 --- a/lib/Channel.php +++ b/lib/Channel.php @@ -21,9 +21,11 @@ class Channel * @return stdClass|array|bool * @throws Exception */ - public function getAll(): stdClass|array|bool + public function getAll(int $object_detail_level=1): stdClass|array|bool { - $response = $this->connection->query('channel.list'); + $response = $this->connection->query('channel.list', [ + 'object_detail_level' => $object_detail_level, + ]); if(!is_bool($response)) { return $response->list; @@ -37,9 +39,12 @@ class Channel * * @return stdClass|array|bool */ - public function get(string $channel): stdClass|array|bool + public function get(string $channel, int $object_detail_level=3): stdClass|array|bool { - $response = $this->connection->query('channel.get', ['channel' => $channel]); + $response = $this->connection->query('channel.get', [ + 'channel' => $channel, + 'object_detail_level' => $object_detail_level, + ]); if (!is_bool($response)) { return $response->channel; @@ -84,7 +89,7 @@ class Channel */ public function kick(string $channel, string $nick, string $reason): stdClass|array|bool { - return $this->connection->query('user.kick', [ + return $this->connection->query('channel.kick', [ 'nick' => $nick, 'channel' => $channel, 'reason' => $reason,