31/12/2010, 15:20
Code PHP :
bind raw - NOTICE opers:notice
proc opers:notice {from key arg} {
global botnick notc mod
set oper_text [split $arg]
if {[join [lrange $oper_text 0 1]] == "Failed OPER"} {
set opers_nick [lindex $oper_text 6]
set opers_user [string range [lindex [split [lindex $oper_text 6] "@"] 0] 1 end]
set opers_host [string range [lindex [split [lindex $oper_text 6] "@"] 1] 0 end-1]
set oper_userhost "$opers_nick!$opers_user@$opers_host"
puthelp "PRIVMSG #opers :Je crois bien que $opers_nick a du mal à s'ircop... ( $opers_userhost )"
puthelp "PRIVMSG $opers_nick :Tout va bien ?"
putlog "[lrange $oper_text 1 2]"
}
}
bind raw - * test:raw
proc test:raw {from kw text} {
putlog "$from => $kw : $text"
}
Rien ne se passe avec ton petit bout de code @CrazyCat.
Ni en PL, ni rien.
Sinon, j'ai essayé ceci pour les connexions, et ça fonctionne.
Code PHP :
bind raw - NOTICE connection:notice
proc connection:notice {from key arg} {
global botnick notc mod
set text [split $arg]
if {[join [lrange $text 2 5]] == "Notice -- Client connecting"} {
set c_nick [lindex $text 9]
set c_user [string range [lindex [split [lindex $text 10] "@"] 0] 1 end]
set c_host [string range [lindex [split [lindex $text 10] "@"] 1] 0 end-1]
set c_userhost "$c_nick!$c_user@$c_host"
puthelp "PRIVMSG #opers :Il y a $c_user @$c_host qui arrive !"
}
}
Mais pour le FAILED OPER, impossible, rien ne se passe.