bind pub - "!ping" pub_ping proc pub_ping {nick uhost hand chan arg} { puthelp "CPRIVMSG $nick #aide :\001PING [unixtime]\001" putlog "!ping demandé par $nick" return 0 } bind ctcr - PING lag_reply proc lag_reply {nick uhost hand dest key arg} { if {$key == "PING"} { set endd [unixtime] set arg [lindex $arg 0] if [estunnombre:ok $arg] { set lagg [expr $endd - $arg] putbot Aide "notice $nick Votre Ping avec AideBot est de $lagg secondes !" putloglev 8 #Aide "Le ping de $nick est de $lagg secondes" } } } bind ctcp - PING ping_resp proc ping_resp {nick uhost hand botnick key arg} { if {$key == "PING"} { puthelp "CPRIVMSG $nick #aide :\001PING [unixtime]\001" } } bind dcc OJ ping dcc_ping proc dcc_ping {handle idx args} { global botnick set args [lindex $args 0] if {$args == ""} { putdcc $idx "## Syntaxe: .ping " return 0 } if {[string tolower [lindex $args 0]] == [string tolower $botnick]} { boot $handle "On ne fait pas d'expérience sur mon dos, j'ai horreur de ça!" bootbot $handle return 0 } puthelp "CPRIVMSG $args #aide :\001PING [unixtime]\001" return 1 }