You have only seconds to act before a flood disconnects you. Change your nick. Look at the flood messages and determine who is flooding you. Continue to change your nick frequently until the danger has passed. If you're flooded off before you can respond, change your nick before logging back on, and set yourself invisible before rejoining any channels.
Flooding is often a sign of a channel takeover attempt.
If the channel is attacked, cooperate with the ops. Many IRC programs, including mIRC, have built-in flood protection. Check your documentation to see how your flood protection works. Don't do it. Do not run any IRC script you have not checked, line by line, for back doors.