Add /unban Command
This commit is contained in:
@@ -569,6 +569,22 @@ namespace reallife_gamemode.Server.Commands
|
||||
Client target = ClientService.GetClientByName(user);
|
||||
ClientExtension.BanPlayer(admin, target, reason, mins);
|
||||
}
|
||||
[Command("unban", "~m~Benutzung: ~s~/unban [User] ", GreedyArg = true)]
|
||||
public void CmdAdminUnban(Client admin, string user)
|
||||
{
|
||||
if (ClientExtension.IsLoggedIn(admin) == false)
|
||||
{
|
||||
ChatService.PlayerNotLoggedIn(admin);
|
||||
return;
|
||||
}
|
||||
if (!admin.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true)
|
||||
{
|
||||
ChatService.NotAuthorized(admin);
|
||||
return;
|
||||
}
|
||||
Client target = ClientService.GetClientByName(user);
|
||||
ClientExtension.UnbanPlayer(admin, target);
|
||||
}
|
||||
|
||||
|
||||
//TEST COMMAND
|
||||
|
||||
Reference in New Issue
Block a user