Expliquation tcl ;)
#5
tcl
bind msg - "setadmin" tournoi:setadmin
bind msg - "settournois" tournoi:settournois
bind pubm - * !admin
bind pubm - * !tn

#set de ladmin
set tournoi(password) "1234"
set tournoi(admin) ""
proc tournoi:setadmin {nick uhost handle text} {
   set args [split $text]
   if {[lindex $args 1] != $::tournoi(password)} {
      putserv "PRIVMSG $nick :Erreur dans le mot de passe"
      return 0
   }
   set ::tournoi(admin) [lindex $args 2]
   putserv "PRIVMSG $nick :OK Changement admin effectuer [lindex $args 2]"
}

#set de la commande tn
set tournoi(password) "1234"
set tournoi(tournois) ""
proc tournoi:settournois {nick uhost handle text} {
   set args [split $text]
   if {[lindex $args 1] != $::tournoi(password)} {
      putserv "PRIVMSG $nick :Erreur dans le mot de passe"
      return 1
   }
   set ::tournoi(tournois) [lindex $args 2]
   putserv "PRIVMSG $nick :OK Changement de la cmd tn effectuer [lindex $args 2]"
}

 
#reaction des commandes 
proc !admin {nick uhost hand chan arg} { 
  if { [regexp "!admin" $arg] } { 
    putserv "PRIVMSG $chan :L'admin Du Tournois Est :  $::tournoi(admin)" 
  } 
} 
 
proc !tn {nick uhost hand chan arg} { 
  if { [regexp "!tn" $arg] } { 
    putserv "PRIVMSG $chan :Tournois :  $::tournoi(tournois)" 
  } 
}



Salut donc j'ai c/c ce que tu ma écris j'ai donc rajouter proc pour faire dire la commande sur le channel si un user tape !admin ou !tn

çà fonctionne très bien le pass etc la commande nickel

il me dit en pv l'admin est maintenant blabla mais aucune réaction au niveau du channel a la commande !admin
Merci bien Wink
Répondre Avertir


Messages dans ce sujet
Expliquation tcl ;) - par Cyril - 10/03/2009, 18:26
RE: Expliquation tcl ;) - par CrazyCat - 10/03/2009, 18:41
RE: Expliquation tcl ;) - par Cyril - 10/03/2009, 18:47
RE: Expliquation tcl ;) - par CrazyCat - 10/03/2009, 18:54
RE: Expliquation tcl ;) - par Cyril - 12/03/2009, 01:44
RE: Expliquation tcl ;) - par Merwin - 12/03/2009, 08:28
RE: Expliquation tcl ;) - par CrazyCat - 12/03/2009, 17:28
RE: Expliquation tcl ;) - par Cyril - 13/03/2009, 16:18
RE: Expliquation tcl ;) - par CrazyCat - 13/03/2009, 18:02

Atteindre :


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