mIRC Homepage
Posted By: kwell system voice - 29/05/11 10:44 AM
What would you advise me?

Code:
on *:text:*:#: { 
  if $strip($1-) == $gettok(%questions,2,169) {
    .disable #texto
    .timers off
    correct_answer
    $voice($nick,$chan)    
  }
}

alias voice {
  if !$istok(%voice,$1,32) { 
    set %voice $addtok(%voice,$1,32)
    mode $2 +v $1
  }
}

====================== OR ======================
 
on *:text:*:#: { 
  if $strip($1-) == $gettok(%questions,2,169) {
    .disable #texto
    .timers off
    correct_answer
    if !$istok(%voice,$nick,32) { 
      set %voice $addtok(%voice,$nick,32)
      mode $chan +v $nick
    } 
  }
}
Posted By: Riamus2 Re: system voice - 29/05/11 01:10 PM
The benefit of using aliases/identifiers is in having them available for use in more than one place without duplicating code, or for easy access to something from the edit line. If you are going to use $voice() somewhere else, then use the alias. If this is the only place you're using it, then there's no reason to have the alias.
© mIRC Discussion Forums