I am trying to create an uptime script that will start a timer for each channel the command is executed. I am then wanting it to echo back what that uptime is. Needless to say I am having issues trying to make the uptime count up for an infinite amount of time and then stop after the streamer leaves. Here is what I have so far just to give you all an idea as to what I am trying to do. Any help with this would be awesome as I have been pondering it for a while.

Code:

on *:text:!uptimecheck on:#: {
  set %uptimecheck. [ $+ [ $chan ] ] 1 
  msg $chan /me Uptime is now enabled
  /timer1 0 1 $+ $chan
}

on *:text:!uptimecheck off:#: {
  set %uptimecheck. [ $+ [ $chan ] ] 0 
  msg $chan /me Uptime is now disabled
  /timer1 $+ $chan off
}

on !*:JOIN:#: {
  if ( %uptimecheck. [ $+ [ $chan ] ] == 1 ) {
    /timer1 0 1 $+ $chan
  }
}

on !*:PART:#: { 
  /timer1 $+ $chan off

}

on *:text:!uptime:#: {
  if ( %uptimecheck. [ $+ [ $chan ] ] == 1 ) {
    msg $chan $duration(timer1)
  }
}



Thanks,

Netct25