addvoice
#1
bonjour / bonsoir

j'ai le tcl gestion bot

dedans j'ai essaye d'ajouter un addvoice

donc j'ai ce code


tcl
	proc addvoice { nick host hand text } {
         set vhand [lindex [split [lindex $text 0] |] 0]
         set chan [lindex $text 1]
	if {[channel get $chan GB]==0} { return; }
    if { [nick2hand $nick] eq "*" } {
         puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(access)]"
    return 0
    }
    if ![isauth $hand] {
         puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(auth)]"
    return 0
    }
    if {![string match #* $chan]} {
         puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick addvoice <pseudo> <#salon> ) !"
    return 0
    }
    if ![validchan $chan] {
         puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(salon)]"
    return 0
    }
    if ![matchattr $hand o|m $chan] {
         puthelp "notice $nick :[subst -nocommands -nobackslashes $::GB::msg(level)]"
    return 0
    }
    if [matchattr $vhand |n $chan] {
         puthelp "notice $nick :Ce pseudo figure dans l'Access-List Owners sur $chan !"
    return 0
    }
    if [matchattr $vhand |m $chan] {
         puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
    return 0
    }
    if [matchattr $vhand |o $chan] {
         puthelp "notice $nick :Ce pseudo figure dans l'Access-List Opérateurs sur $chan !"
    return 0
    }
    if [matchattr $vhand |m $chan] {
         puthelp "notice $nick :Ce pseudo figure dans l'Access-List Masters sur $chan !"
    return 0
    }
         adduser $vhand $vhand*!*@*
		 setuser $vhand HOSTS $vhand!*@*
         setuser $vhand HOSTS $vhand|*!*@*
         chattr  $vhand +v $chan
		 foreach line [split $::GB::msg(pvmsg) "\n"] {
		 putserv "privmsg $vhand :$line"
        }
         puthelp "notice $nick :$vhand a bien été ajouté(e) en tant que voice sur $chan !"
         putserv "privmsg $GB::log :\00314Commande \0036\[\0033Add-vocie\0036\] \0031par : \0034$hand"
		 save
}



il me dis bien que la personne et dans la liste des voices mes elle n'est pas voicer quand elle rejoins le salon

je mis prend surement mal mais j'essaye de découvrir les code tcl ^^
Répondre Avertir


Messages dans ce sujet
addvoice - par lesny - 22/12/2011, 21:34
RE: addvoice - par DnS - 22/12/2011, 21:47
RE: addvoice - par lesny - 22/12/2011, 22:25
RE: addvoice - par DnS - 22/12/2011, 22:48
RE: addvoice - par lesny - 22/12/2011, 22:52
RE: addvoice - par lesny - 23/12/2011, 13:05
RE: addvoice - par aliasangelius - 24/12/2011, 10:05

Atteindre :


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