timer_reason = nil
user = nil
function NewUserConnected(curUser)
user = curUser
SetTimer(3000)
if (curUser.sName==badname) then
timer_reason = "msgbadnick"
StartTimer()
end
end
function OnTimer()
if (timer_reason=="msgbadnick") then
MsgBadNick()
end
if (timer_reason=="banbadnick") then
BanBadNick()
end
end
function MsgBadNick()
StopTimer()
SetTimer(30000)
StartTimer()
timer_reason = "banbadnick"
end
function BanBadNick()
StopTimer()
user:TimeBan(1)
end
the code just seems to run through everything in the OnTimer event even though i stopped the timer before i set and started it with the new time.
http://lua.uknnet.com/thread.php?sid=&postid=4143#post4143