Guest User

Untitled

a guest
Jan 26th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 1.13 KB | None | 0 0
  1. # Last version of egglib_pub can be grabbed here:
  2. # http://eggdrop.org.ru/scripts/egglib.zip
  3.  
  4. if { ![info exists egglib(ver)] || [expr {$egglib(ver) < 1.2}] } {
  5.   putlog "***********************************************"
  6.   putlog "   egglib_pub NOT FOUND OR VERSION IS TOO OLD!"
  7.   putlog "   Download last version of egglib_pub here:"
  8.   putlog "http://eggdrop.org.ru/scripts/egglib_pub.zip"
  9.   putlog "***********************************************"
  10.   die
  11. }
  12.  
  13. bind pub - .ss pub_kzstats
  14. bind pub - .servers pub_kzstats
  15.  
  16. proc pub_kzstats {nick uhost hand chan args} {
  17.  
  18.   # Путь к нашему скрипту
  19.   set query "http://localhost/denwer/cs.php"
  20.   set snum "S1"
  21.  
  22.   set id [::egglib::http_init "pub_kzstats_"]
  23.  ::egglib::http_get $id $query [list $nick $uhost $chan]
  24. }
  25.  
  26.  
  27. proc pub_kzstats_on_error {id nick uhost chan} {
  28.        ::egglib::out $nick $chan "OFF"
  29. }
  30.  
  31. proc pub_kzstats_on_data {id data nick uhost chan} {
  32.  
  33. putlog "kzstat command"
  34.  
  35. foreach line [split $data \n] {
  36.  
  37.        if { [regexp -nocase -- {<cut>(.*?)</cut>} $line garb kzstat] } {
  38.                putserv "PRIVMSG $chan $kzstat"
  39.        }
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment