Guest User

Untitled

a guest
Jun 22nd, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. set cmds(update) "!update"
  2. set cmds(start) "!start"
  3.  
  4. #binding commands
  5. bind PUB - $cmds(update) ::upprox
  6. bind PUB - $cmds(start) ::start
  7.  
  8. proc upprox { nick host handle chan text } {
  9. set fichier "/home/gogaz/codaz/eggdrop/test.txt"
  10. set fp [open $fichier r]
  11. set data [read $fp]
  12. close $fp
  13. set data [split $data "\n"]
  14. set proxylist [list ""]
  15. # set myreg "([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})"
  16. foreach line $data {
  17. set proxy [regexp "((\[0-9\]{1,3})\.){4}" $line ip]
  18. append proxylist "$proxy"
  19. }
  20. global $proxylist
  21. }
  22.  
  23. proc start { nick host handle chan text } {
  24. # set liste [::proxylist "/home/gogaz/codaz/eggdrop/test.txt"]
  25. set msg_s [lindex $proxyliste [expr {int(rand() * ([llength $proxyliste] - 1))}]]
  26. # set a "#xchat-fr"
  27. puthelp "PRIVMSG $chan:$nick: $msg_s"
  28. }
Add Comment
Please, Sign In to add comment