Make the maximum number of messages match the value set in prefs.

Without this patch, the flood control always allows one message more than set.