Allow detecting more than 3 nicks receiving modes

The old implementation only worked with up to three nicks. This new one
should work with an arbitrary number.