]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blobdiff - lib/Channel.php
Use the correct parameter for gline expiry timestamp
[irc/unrealircd/unrealircd-rpc-php.git] / lib / Channel.php
index 73c85fd41e213e30ab707cccbda270b3900f48c7..a3e0b4880070a9411f2ddd14de57dc9e7782b2fa 100644 (file)
@@ -23,13 +23,7 @@ class Channel implements Contracts\User
      */
     public function get(): stdClass
     {
-        $id = random_int(100, 1000);
-
-        $response = $this->connection->query($id, 'channel.list');
-
-        if($id !== $response->id) {
-            throw new Exception('Invalid ID. This is not the expected reply.');
-        }
+        $response = $this->connection->query('channel.list');
 
         if(!is_bool($response)) {
             return $response;
@@ -47,13 +41,7 @@ class Channel implements Contracts\User
      */
     public function show(array $params): stdClass
     {
-        $id = random_int(100, 1000);
-
-        $response = $this->connection->query($id, 'channel.get', ['channel' => $params['channel']]);
-
-        if($id !== $response->id) {
-            throw new Exception('Invalid ID. This is not the expected reply.');
-        }
+        $response = $this->connection->query('channel.get', ['channel' => $params['channel']]);
 
         if (!is_bool($response)) {
             return $response;