nick list
#1
bonjour merci pour pour l aide hier
j aurais bien voulus ameliorer ce code rajouter un fond de couleur et cganger la couleur des nick
plus afficher le status de luser si il est op voice owner ect...
voici le code
TCL
set canal "#bienvenue"
set fichier "/home/mandarin/domains/tchatweb.net/public_html/liste.html"
 
bind join - "$canal *" list:join
bind part - "$canal *" list:part
bind sign - "$canal *" list:quit
 
proc list:join {nick uhost handle chan} { list:log; }
proc list:part {nick uhost handle chan text} {
if {$nick != $::botnick} { list:log; }
}
proc list:quit {nick uhost handle chan text} {
if {$nick != $::botnick} { list:log; }
}
 
proc list:log {} {
set fp [open $::fichier w]
foreach cnick [chanlist $::canal] {
puts $fp "$cnick"
puts $fp "<br>"
 
}
close $fp
}


merci bcp de l aide

Edit: merci d'utiliser les balises [ tcl ]
Répondre Avertir
#2
Pour le statut des utilisateurs, il y a l'exemple dans chanrelay, voici ce que ça donne mis dans ton script:
TCL
set canal "#bienvenue"
set fichier "/home/mandarin/domains/tchatweb.net/public_html/liste.html"
 
bind join - "$canal *" list:join
bind part - "$canal *" list:part
bind sign - "$canal *" list:quit
 
proc list:join {nick uhost handle chan} { list:log; }
proc list:part {nick uhost handle chan text} {
    if {$nick != $::botnick} { list:log; }
}
proc list:quit {nick uhost handle chan text} {
    if {$nick != $::botnick} { list:log; }
}
 
proc list:log {} {
    set fp [open $::fichier w]
    foreach cnick [chanlist $::canal] {
        if { $cnick == $::botnick } { continue; }
        if { [isop $cnick $::canal] == 1 } {
            set st "@"
        } elseif { [ishalfop $cnick $::canal] == 1 } {
            set st "%"
        } elseif { [isvoice $cnick $::canal] == 1 } {
            set st "%"
        } else {
            set st ""
        }
        puts $fp "$st$cnick<br />"
    }
    close $fp
}


Pour le background et autres mises en page, je te conseille de plutôt faire une page qui incluera le liste.html (soit en php soit en SSI), ce sera bien plus souple

Edit: script corrigé
Répondre
#3
merci pour ta reponse mais j ai plus de nick qui s affiche
http://tchatweb.net/liste.html
Répondre Avertir
#4
T4tou a écrit :merci pour ta reponse mais j ai plus de nick qui s affiche
http://tchatweb.net/liste.html

j ai oublier voici l erreur
Tcl error [list:part]: can't read "::crelay::me(chan)": no such variable
Répondre Avertir
#5
salut peut etre ajouter en debut de tcl un truc du style :

TCL
set crelay "#bienvenue"




cordialemement.
Répondre Avertir
#6
Arf non, copier/coller trop rapide.
Il faut remplacer $::crelay::me(chan) par $::canal
Répondre


Atteindre :


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