another doubt

i would like he banned when the user said a badword the second time

for example

<Fill> you're gay
Fill was kicked by Bot (No badwords)

then eventually the user would be back

and said for example

<Fill> go shit

As this is the second time i say a badword, the bot bans me for 5 hours and kicks me ...

any ideas?? i tried to do this but i've done a code that completely blocks mIRC (is stops responding and i have to end mIRC in Ctrl+Alt+Del) so please!!!