Skip to content
General Chat Talk

What Is Wrong With This Code ????????

A TG007 community discussion started by Bloodyboss.

Discussion 3 posts
Page 1 of 1
Open
Topic #13919 · 3 published posts · 1,170 views

on *:connect: {

timeraway 0 300 {

if ( $idle >= %atime ) && (!$away) {

nick $me $+ [away]

away 4 auto away after %atime minutes | ame 1auto4 away after %atime 1minutes

}

}

}

 

can anyone tell me why this code is not working

and can anyone please try it I set %atime as 300 [5 mins] it is in vairiables like this %atime 300

on *:connect:.timeraway 0 300 nickchange
alias -l nickchange {
  if ($idle >= %atime) && (!$away) {
    nick $me $+ [away]
    away 4 auto away after %atime minutes
    ame 1auto4 away after %atime 1minutes
  }
}

 

The connect bit refers to when you connect to a server. So, you will get errors if you are not in a channel. Try this code...

 

on *:connect:.timeraway 0 300 nickchange
alias -l nickchange {
  if ($active ischan) {
    if ($idle >= %atime) && (!$away) {
      nick $me $+ [away]
      away 4 auto away after %atime minutes
      ame 1auto4 away after %atime 1minutes
    }
  }
}