You could take the easy road and use mIRCs internal flood protection feature (/help flood)
- Enable at Options:IRC:Flood
- Set a low "trigger after" limit (e.g. 100)
- Set large "in buffer" and "per person" values
- Enable "Queue: Own messages".
Or via editbox: