Code:
#Auto on
on @*:text:!voice*:#:{
  if ($iif($2,$2,$nick) ison #) {
    mode # +v $v1
    .notice $v1 You have been given voice on #
  }
}
on @*:text:!devoice*:#:{
  if ($iif($2,$2,$nick) ison #) {
    mode # +v $v1
    .notice $v1 You have been stripped of voice on #
  }
}
#Auto end


RusselB: your method will not work with just !voice or !devoice as $$2 would make the script halt if $2 does not exist as a parameter. That is the nature of using $$. For yours to work as the OP wants it you would have to type !voice non-existent-nick to voice yourself.