Donc tu auras compris qu'il te faut un bind join pour avoir une action (un /whois) sur les arrivées sur le canal et deux (ou trois) binds raw pour récupérer le retour du whois.
Voici un source (pas testé, c'est un exemple "théorique"):
Simple, non ?
Voici un source (pas testé, c'est un exemple "théorique"):
tcl
#le canal à surveiller
set canal "#blabla"
bind join - "$canal *" ircop:whois
proc ircop:whois { nick uhost handle chan } {
# Si c'est l'eggdrop qui arrive, on sort
if { $nick == $::botnick } { return 0 }
putserv "WHOIS $nick"
return 0
}
bind raw - 313 ircop:is
proc ircop:is { frm kw text } {
# cette procédure n'est déclenchée que si un /whois retourne un status ircop
set infos [split $text ":"]
set user [split $infos 0]
# $user est le nick de l'ircop
if { [onchan $nick $::canal] } {
# si l'ircop est sur le canal surveillé
putserv "PRIVMSG $::canal :Attention $::canal, $nick surveille !"
}
}
Simple, non ?