mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Added more Ban APIs. Now you can directly ban
This commit is contained in:
parent
78bfe7ce24
commit
0d3cf74636
1 changed files with 16 additions and 0 deletions
|
|
@ -148,6 +148,22 @@ class BanAPI{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function ban($username){
|
||||||
|
$this->commandHandler("ban", array("add", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pardon($username){
|
||||||
|
$this->commandHandler("ban", array("pardon", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function banIP($username){
|
||||||
|
$this->commandHandler("banip", array("add", $username));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function pardonIP($username){
|
||||||
|
$this->commandHandler("banip", array("pardon", $username));
|
||||||
|
}
|
||||||
|
|
||||||
public function isIPBanned($ip){
|
public function isIPBanned($ip){
|
||||||
if($this->server->api->dhandle("api.ban.ip.check", $ip) === false){
|
if($this->server->api->dhandle("api.ban.ip.check", $ip) === false){
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue