transformation du script mirc en script tcl
#21
Alors voila le tcl que tu souhaite ...
Il faut lui dire ton age en priver pour qu'il te sajoin sur le bon salon qui devrais (théoriquement) etre en mode +is
tcl
bind join - #sexe proc:join
bind msg - * msg:all
 
proc proc:join {nick host hand chan} {
 global botnick
   puthelp "PRIVMSG $nick Bonjour $nick,pour pouvoir rentrer sur le salon il faut que tu me donne ton age"
   puthelp "PRIVMSG $nick Pour cela tape la commande </msg $botnick age ton_age> exemple </msg $botnick age 45>"
   puthelp "PRIVMSG $nick Si vous ettes mineurs et que vous passer cette securiter le tchat ne sera pas tenue responsable de sa."
   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 "PRIVMSG $nick :Tu n'as pas l'âge requis pour rejoindre le salon"
         puthelp "mode #sexe +b $nick"
		 puthelp "mode #sexe +b $host"
		 puthelp "mode #sexe-bon +b $nick"
		 puthelp "mode #sexe-bon +b $host"
         puthelp "SAPART $nick #sexe"
         return 0
      } else {
         puthelp "PRIVMSG $nick :Votre âge est correcte"
		 puthelp "SAPART $nick #sexe"
		 puthelp "SAJOIN $nick #sexe-bon"
         return 0
      }
   }
}
 
proc isnum {string} {
  if {([string compare $string ""]) && (![regexp "\[0-1\]\[0-7\]\$" $string])} then {return 1}
  return 0
}



PS : J'espere que je met le bon code car j'en est des dixaines
Répondre


Messages dans ce sujet
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 : 2 visiteur(s)
Tchat 100% gratuit -Discutez en toute liberté