*
* @param string $user
* @return stdClass|array|bool
- * @throws Exception
*/
public function add(string $name, string $type, string $duration, string $reason): stdClass|array|bool
{
if (is_bool($response))
return false;
-
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
*
* @param string $name
* @return stdClass|array|bool
- * @throws Exception
*/
public function delete(string $name, string $type): stdClass|array|bool
{
return $response->tkl;
}
- throw new Exception('Invalid JSON Response from UnrealIRCd RPC.');
+ return false; // didn't exist
}
}