WorldDMT commented on a Page, Auto Hop All Channels  -  Mar 30, 2010

hi
you can group the two conditions ON and OFF together with a $istok
and if the timer is running you need not put off then restart just remade it
for the first error is about syntax not insufficient parameters so your code can be like this

alias hopall {
  .partall $1-
  join -n $regsubex($str(.,$chan(0)),/./g,$+($chan(\n),$chr(44)))
}
alias autohop {
  if $istok(on.off,$1,46) {
    if %hoptime {
      .timer[autohop] $iif($1 == on,0 %hoptime hopall,off)
      set %autohop $1
      echo $color(info) * Auto Hop All Channels is now $1 $+ $iif($1 == on,$chr(44) on %hoptime Second(s))
    }
    else echo $color(info) * Auto Hop All Channels time is not seted, set it with: /autohop set <time>
  }
  elseif $1 == set {
    if $2 isnum {
      set %hoptime $2
      if (%autohop == on) .timer[autohop] 0 %hoptime hopall
      echo $color(info) * Auto Hop All Channels $iif($v1 == on,was on $+ $chr(44) Script Reloaded %hoptime starting to count from now,time seted to: %hoptime second(s))
    }
    else echo $color(info) * /autohop: Error syntax - /autohop set <time>
  }
  else echo $color(info) * /autohop: insufficient parameters
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.