why do you have it set a local then set a global var for?
also you should silence an name the timers.
you should add a few more checks as if %nick = the bot or who ever is running the snippet. as well as add some kind of flood pro to it.
Get rid of the global var an use a local.
maybe make it check if there are more then 3 people in the channel.
why all the foul language?