19/11/2012, 00:29
Salut,
Sa devrais fonctionner comme sa
TCL
bind msg - "say" say
proc say { nick uhost hand text } {
set chan [string tolower [lindex $text 0]]
if { [nick2hand $nick] eq "*" } {
puthelp "notice $nick :aucun axx"
return 0
}
if {![string match #* [lindex $text 0]]} {
puthelp "notice $nick :Syntaxe incorrecte ! ( /msg $::botnick say <#salon> <text> ) !"
return 0
}
if {![validchan [lindex $text 0]]} {
puthelp "notice $nick :Désolé $nick mais le salon que tu demandes est inconnu !"
return 0
}
if {![matchattr $hand o|o $chan]} {
puthelp "notice $nick :Vous n'avez pas le level suffisant dans $::botnick pour utiliser cette commande $nick !"
return 0
}
if {![botonchan [lindex $text 0]]} {
puthelp "notice $nick :Désolé $nick mais je suis absent du salon $chan !"
return 0
}
set chann "[lindex [channels] [lsearch [string tolower [channels]] [string tolower [lindex $text 0]]]]"
putserv "privmsg [lindex $text 0] :[join [lrange $text 1 end]]"
return
}
Sa devrais fonctionner comme sa