I see there is a $bnick in the code. It may return $null if the ban itself doesn't include the banned nickname.