Do sending whispers via IRC still contribute to the limit on chat messages?
i.e., if the limit is 20 messages in 30 seconds, for example, and I send 15 messages and 10 whispers, will that cause my account to get banned for spamming?
If not, is there a separate limit for whispers, and what is it?
Whispers do not adhere to the same rate limits, no. I believe you can send a whisper per a couple seconds, but the exact rate limit is not documented as far as I know. There are also other undocumented rate limits to deal with spammers. It is worth noting that Twitch will likely move whispers off IRC at some point in the near future given that their site no longer sends whispers to/from IRC.