Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proc connexion {} {
- global cbot
- if {![catch "connect $cbot(ip) $cbot(port)" cbot(idx)]} {
- putdcc $cbot(idx) "PASS $cbot(pass)"
- putdcc $cbot(idx) "SERVER $cbot(link) 1 :$cbot(info)"
- putdcc $cbot(idx) ":$cbot(link) NICK $cbot(pseudo) 1 [unixtime] $cbot(ident) $cbot(host) $cbot(link) :$cbot(real)"
- putdcc $cbot(idx) ":$cbot(pseudo) MODE $cbot(pseudo) $cbot(mode)"
- foreach {chan} $cbot(salon) { putdcc $cbot(idx) ":$cbot(pseudo) JOIN $chan" }
- control $cbot(idx) event; utimer 30 verification
- }
- }
- if {![info exists cbot(idx)]} { connexion }
- proc verification {} {
- global cbot
- if {[valididx $cbot(idx)]} { utimer 30 verification } else { connexion }
- }
- proc event {idx arg} {
- global cbot
- set arg [split $arg]
- "PING" { putdcc $cbot(idx) "PONG [lindex $arg 1]" }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement