r00t-err0r

devba-stats

Dec 4th, 2012
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.61 KB | None | 0 0
  1. bind pub - !statistika pub_statistika
  2.  
  3. package require http
  4.  
  5. proc pub_statistika {nick host hand channel devba} {
  6. set url "http://www.dev.ba/"
  7.   set token [ ::http::geturl $url ]
  8.   set page [ ::http::data $token ]
  9. set devba [ regexp -all -inline {<h3>Statistics</h3>.*?</strong></p>} $page ]
  10. regsub -all {&bull;} $devba "\u2022" devba
  11. regsub -all {<.*?>} $devba "" devba
  12. regsub -all {Statistics} $devba "" devba
  13. regsub -all "\[\t\n\]" $devba { } devba
  14. regsub -all -- {\}} $devba {} devba
  15. regsub -all -- {\{} $devba {} devba
  16. putserv "privmsg $channel Statistika Dev.BA - [encoding convertto utf-8 $devba]"
  17. }
Advertisement
Add Comment
Please, Sign In to add comment