Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.77 KB | None | 0 0
  1. proc connexion {} {
  2. global cbot
  3. if {![catch "connect $cbot(ip) $cbot(port)" cbot(idx)]} {
  4. putdcc $cbot(idx) "PASS $cbot(pass)"
  5. putdcc $cbot(idx) "SERVER $cbot(link) 1 :$cbot(info)"
  6. putdcc $cbot(idx) ":$cbot(link) NICK $cbot(pseudo) 1 [unixtime] $cbot(ident) $cbot(host) $cbot(link) :$cbot(real)"
  7. putdcc $cbot(idx) ":$cbot(pseudo) MODE $cbot(pseudo) $cbot(mode)"
  8. foreach {chan} $cbot(salon) { putdcc $cbot(idx) ":$cbot(pseudo) JOIN $chan" }
  9. control $cbot(idx) event; utimer 30 verification
  10. }
  11. }
  12.  
  13. if {![info exists cbot(idx)]} { connexion }
  14.  
  15. proc verification {} {
  16. global cbot
  17. if {[valididx $cbot(idx)]} { utimer 30 verification } else { connexion }
  18. }
  19.  
  20.  
  21.  
  22. proc event {idx arg} {
  23. global cbot
  24. set arg [split $arg]
  25. "PING" { putdcc $cbot(idx) "PONG [lindex $arg 1]" }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement