Since ULib stores bans in the sv.db, it must create a table through the
SQL Library.
I won't do it all for you, but I can give you an idea as to how I would do this:
function ulx.unbanAll(calling_ply)
-- I would recommend only running this from the console, so verify that the calling_ply is not a player. This is optional, but I recommend doing it.
if IsValid(calling_ply) and calling_ply:IsPlayer() then
ULib.tsayError(calling_ply, "You cannot use this in-game. Please execute using the server's console or RCon.", true)
return
end
-- Next, we just need to wipe the table.
-- Use sql.Query() (http://wiki.garrysmod.com/page/sql/Query) to issue a DELETE FROM command to the 'ulib_bans' table (https://www.ibm.com/support/knowledgecenter/en/SSEPEK_10.0.0/apsg/src/tpc/db2z_deletedatatables.html)
end
local unbanall = ulx.command("User Management", "ulx unbanall", ulx.unbanAll)
unbanall:defaultAccess(ULib.ACCESS_NONE)
It's very simple. Let me know if you have questions.