]> jfr.im git - irc/unrealircd/unrealircd-rpc-php.git/blobdiff - lib/Ban.php
Merge pull request #5 from unrealircd/wip
[irc/unrealircd/unrealircd-rpc-php.git] / lib / Ban.php
index f9833599eb7df960fedbd7b0c5f4b2f9ef421f49..2a2272caeb4254a99f511e3f4e17a8606720657f 100644 (file)
@@ -25,14 +25,12 @@ class Ban implements Contracts\Ban
      */
     public function add(string $user, array $params): stdClass
     {
-        $response = $this->connection->query('server_ban.add', [
+        return $this->connection->query('server_ban.add', [
             'name' => $user,
             'type' => $params['type'],
             'reason' => $params['reason'],
-            'expire_at' => $params['length'] ?? '1d',
+            'duration_string' => $params['length'] ?? '1d',
         ]);
-
-        return $response;
     }
 
     /**
@@ -45,12 +43,10 @@ class Ban implements Contracts\Ban
      */
     public function delete(string $user, array $params): stdClass
     {
-        $response = $this->connection->query('server_ban.del', [
+        return $this->connection->query('server_ban.del', [
             'name' => $user,
             'type' => $params['type'],
         ]);
-
-        return $response;
     }
 
     /**