There are two ways you can do this.
First being serverCmdBan(0, "", "BL-ID", "Time", "Reason");
The second being banBLID("BL-ID", "Time", "Reason");
With serverCmdBan, the second argument if I am correct is the client object, which will issue the ban with a name and an IP.
If not, it does the same thing as banBLID.