In many cases on a failed lookup such as if a nick didn't exist, this threw an exception which halted things. Also in some cases there weren't bool checks when there needed to be for such catches
{
return new Spamfilter($this);
}
+ public function nameban(): NameBan
+ {
+ return new NameBan($this);
+ }
}
$query['set_by'] = $set_by;
$response = $this->connection->query('name_ban.add', $query);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
$response = $this->connection->query('name_ban.del', [
'name' => $name,
]);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
'reason' => $reason,
'duration_string' => $duration ?? '1d',
]);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
'name' => $name,
'type' => $type,
]);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
'ban_duration' => $ban_duration,
'reason' => $reason,
]);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;
'spamfilter_targets' => $spamfilter_targets,
'ban_action' => $ban_action,
]);
+
+ if (is_bool($response))
+ return false;
+
if (property_exists($response, 'tkl'))
return $response->tkl;
return FALSE;