You should define VIEW_BOTH as VIEW_BAN |  VIEW_EXEMPT, not as 3, because that's how you're using it, implicitly, in banlist_do_refresh()