ply:query is checking ULib to see if the player (represented by ply here) has the "ulx seeasay" permission flag.
The rest of the code is just wrapping our permission check function inside of another function, presumably so they can support multiple admin mods if needed.