![]() |
|
Bind raw - FAILED OPER - Version imprimable +- Communauté Eggdrop (https://forum.eggdrop.fr) +-- Forum : Eggdrop et scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=8) +--- Forum : Scripts (https://forum.eggdrop.fr/forumdisplay.php?fid=4) +--- Sujet : Bind raw - FAILED OPER (/showthread.php?tid=839) |
Bind raw - FAILED OPER - alanfollow - 31/12/2010 Bonjour, J'ai un petit sur ces quelques lignes, qui, comme vous avez pu le comprendre serait que lorsque une personne fait un FAILED OPER, l'eggdrop lui envoi un message, et ainsi qu'un message sur le salon d'oper. J'essaye ceci, mais rien ne se passe, ni même une erreur en PL. Code PHP : bind raw - NOTICE opers:notice
proc opers:notice {from key arg} {
global botnick notc mod
set text [split $arg]
if {[join [lrange $text 1 3]] == "Failed OPER"} {
set opers_nick [lindex $text 6]
set opers_user [string range [lindex [split [lindex $text 6] "@"] 0] 1 end]
set opers_host [string range [lindex [split [lindex $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 ?"
}
}
Sachant que la "SNOTICE" est : Code : -NOTICE- Failed OPER attempt by pseudo (~user@host) [unknown oper]Voilà, merci d'avance ! RE: Bind raw - FAILED OPER - alanfollow - 31/12/2010 Comme ceci ? Code PHP : bind raw - "001" opers:notice
proc opers:notice {from key arg} {
global botnick notc mod
set text [split $arg]
if {[join [lrange $text 1 3]] == "Failed OPER"} {
set opers_nick [lindex $text 6]
set opers_user [string range [lindex [split [lindex $text 6] "@"] 0] 1 end]
set opers_host [string range [lindex [split [lindex $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 ?"
}
}
Rien n'y fait. RE: Bind raw - FAILED OPER - MenzAgitat - 31/12/2010 join [lrange $text 1 3] sur ta notice donne "OPER attempt by" et non pas "Failed OPER". RE: Bind raw - FAILED OPER - CrazyCat - 31/12/2010 As-tu pensé à faire: tcl Et aussi, est-ce que ton eggdrop a les bons flags pour recevoir ces snotices ? @alias_angelius: le raw NOTICE est valable. RE: Bind raw - FAILED OPER - alanfollow - 31/12/2010 MenzAgitat a écrit :join [lrange $text 1 3] sur ta notice donne "OPER attempt by" et non pas "Failed OPER". Je dois mettre : Code : [lrange $text 1 2]Ceci alors ? @CrazyCat: L'eggdrop est ircop, c'est bon normalement, non ? (pour recevoir les snotices). Code PHP : bind raw - NOTICE opers:notice
proc opers:notice {from key arg} {
global botnick notc mod
set text [split $arg]
if {[join [lrange $text 1 2]] == "Failed OPER"} {
[lrange $text 1 3]
set opers_nick [lindex $text 6]
set opers_user [string range [lindex [split [lindex $text 6] "@"] 0] 1 end]
set opers_host [string range [lindex [split [lindex $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 ?"
}
}
RE: Bind raw - FAILED OPER - MenzAgitat - 31/12/2010 Ne donne des valeurs au hasard et réfléchis un peu. Les éléments d'une liste sont comptés à partir de 0. Pourquoi tu n'essaies pas de mettre cette ligne dans ton code pour voir ce que ça retourne ? Tu verras ainsi ce que tu extrais de la notice : tcl un peu de lecture : http://www.eggdrop.fr/Utilisation_des_listes RE: Bind raw - FAILED OPER - CrazyCat - 31/12/2010 alanfollow a écrit :Non, tu vois bien que l'index 1 contient "OPER".MenzAgitat a écrit :join [lrange $text 1 3] sur ta notice donne "OPER attempt by" et non pas "Failed OPER".Je dois mettre : Il te faut donc: tcl alanfollow a écrit :@CrazyCat: L'eggdrop est ircop, c'est bon normalement, non ? (pour recevoir les snotices).Il lui faut surtout le flag +s (receive server notices) J'ai l'impression que tu n'as pas lu mon message et donc pas testé mon petit bout de script. Conclusion: j'aiderai quand tu liras et appliqueras. RE: Bind raw - FAILED OPER - alanfollow - 31/12/2010 Kékidi ? ^^ T'en fais pas pour la sécurité ;) RE: Bind raw - FAILED OPER - alanfollow - 31/12/2010 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. RE: Bind raw - FAILED OPER - cestlemien - 31/12/2010 coucou , Et si tu changes le mot detecté " Failed OPER " Par : " [unknown oper] " cordialement. |