Quote:
Here's a re-write of the code so that it uses groups rather than load/unload (which I had been maintaining simply since that's how the original poster had it). The menu system included in the code has been tested and does work as it is supposed to. Personally I would've preferred some other options, but they don't seem to be available unless they're in a 3rd party dll (which I don't have)
Code:
 ;;;;;;;;;;;
; Anti-PV ;
;;;;;;;;;;;;
#anti-pv off
;
on ^*:OPEN:?:{
  haltdef
  .msg $nick [Auto Msg] 12!8*12!0!!4!! 9Bonjours, j'utilise un anti-Pv, si j'ai le temps, Je vais vous répondre sous peu 4:11-4)
  .ignore -pu $nick 300
  .timer 1 0 anti-pv $nick $1-
}
alias anti-pv {
  var %anti-pv.nick = $1, %anti-pv.msg = $2-
  if ($?!="Privé de %anti-pv.nick $+ , accepter ? $crlf $+ Message: %anti-pv.msg ") {
    .msg %anti-pv.nick [Auto Msg] Demande de privé accepté \o/ Bonjours sa va ?
    .ignore -r $nick
    .query %anti-pv.nick
    echo -itlbfrc normal < $+ %anti-pv.nick $+ > %anti-pv.msg
    ; ^ adds their text to the query
    ;
    var %i = 1
    while ($chan(%i)) {
      echo -itlbfrc notice - $+ %anti-pv.nick $+ - %anti-pv.msg
      inc %i
    }
    ; ^ fakes a notice from the user of their text
    ;
  }
  else {
    .msg %anti-pv.nick [Auto Msg] Demande de privé refusé dsl :( !
  }
}
;
#anti-pv END
;
menu * {
  Anti-PV
  .$iif($group(#anti-pv).status == on,$style(2)) .Activé : .enable #anti-pv
  .$iif($group(#anti-pv).status == off,$style(2)) .DesActivé : .disable #anti-pv
}
 

tanks for that one work #1 grin