transformation du script mirc en script tcl
#13
tcl
bind join - #sex proc:join
bind msg - * msg:all
 
proc proc:join {nick host hand chan} {
 
   puthelp "NOTICE $nick Bonjour $nick,Pour pouvoir rentrer sur le salon il me faut ton âge (tape la commande /msg AGent-de-police \"age\" ) !"
   puthelp "NOTICE $nick TchaT-TenDanCe ne sera pas responsable si vous êtes mineur et que vous entrez sur le salon !!"
 
   return 0
}
 
proc msg:all {nick host hand text} {
 
   set arg [split $arg]
   set age [lindex $arg 0]
 
   if {[isnum $age]} {
      if {$age < 18} {
         puthelp "NOTICE $nick :Tu n'as pas l'âge requis pour rejoindre le salon !!"
         puthelp "NOTICE $nick :L' âge requis est de 18 ans minimum"
         puthelp "SAPART $nick #sex"
         return 0
      } else {
         puthelp "NOTICE $nick :Bienvenue sur #sexe"
         return 0
      }
   }
}
 
proc isnum {string} {
  if {([string compare $string ""]) && (![regexp \[^0-9\] $string])} then {return 1}
  return 0
}


Répondre Avertir


Messages dans ce sujet
RE: transformation du script mirc en script tcl - par vins - 06/06/2008, 15:49
RE: transformation du script mirc en script tcl - par heretoc - 03/12/2009, 16:33
RE: transformation du script mirc en script tcl - par heretoc - 03/12/2009, 20:16
RE: transformation du script mirc en script tcl - par heretoc - 04/12/2009, 11:14
RE: transformation du script mirc en script tcl - par heretoc - 04/12/2009, 13:42

Atteindre :


Utilisateur(s) parcourant ce sujet : 1 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté