4
0

eggdrop-pisg.tcl 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #pisg.tcl v0.15 by HM2K - auto stats script for pisg (perl irc statistics generator)
  2. #based on a script by Arganan
  3. set pisgver "0.15"
  4. #Location of pisg execuitable perl script
  5. set pisgexe "/home/nf/pisg/pisg"
  6. #URL of the generated stats
  7. set pisgurl "http://stats.nemesisforce.com/"
  8. #channel that the stats are generated for
  9. set pisgchan "#nemesisforce"
  10. #Users with these flags can operate this function
  11. set pisgflags "nm"
  12. #How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes
  13. set pisgtime "30"
  14. bind pub $pisgflags !stats pub:pisgcmd
  15. proc pub:pisgcmd {nick host hand chan arg} {
  16. global pisgexe pisgurl pisgchan
  17. append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
  18. puthelp $out
  19. }
  20. proc pisgcmd_timer {} {
  21. global pisgexe pisgurl pisgchan pisgtime
  22. append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
  23. puthelp $out
  24. timer $pisgtime pisgcmd_timer
  25. }
  26. if {![info exists {pisgset}]} {
  27. set pisgset 1
  28. timer 2 pisgcmd_timer
  29. }
  30. putlog "pisg.tcl $pisgver loaded"