]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blobdiff - lib/ServerBan.php
Channel: add optional $object_detail_level argument to getAll() and get().
[irc/unrealircd/unrealircd-rpc-php.git] / lib / ServerBan.php
index 9f874b871fd4e307490afb0a080c5420968d3891..5764d542d8ef93d100df09af51bd452cde90a8ef 100644 (file)
@@ -20,7 +20,6 @@ class ServerBan
      *
      * @param  string  $user
      * @return stdClass|array|bool
-     * @throws Exception
      */
     public function add(string $name, string $type, string $duration, string $reason): stdClass|array|bool
     {
@@ -33,7 +32,7 @@ class ServerBan
 
         if (is_bool($response))
             return false;
-            
+
         if (property_exists($response, 'tkl'))
             return $response->tkl;
         return FALSE;
@@ -44,7 +43,6 @@ class ServerBan
      *
      * @param  string  $name
      * @return stdClass|array|bool
-     * @throws Exception
      */
     public function delete(string $name, string $type): stdClass|array|bool
     {
@@ -95,6 +93,6 @@ class ServerBan
             return $response->tkl;
         }
 
-        throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+        return false; // didn't exist
     }
 }