eggdrop-pisg.tcl 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pisg.tcl v0.15 by HM2K - auto stats script for pisg (perl irc statistics generator)
  2. #based on a script by Arganan
  3. # WARNING - READ THIS
  4. #
  5. # If you use this script, PLEASE read the documentation about the "Silent"
  6. # option. If you get the message "an error occured: Pisg v0.67 - perl irc
  7. # statistics generator" in the channel, you are NOT running silent. Fix it.
  8. set pisgver "0.15"
  9. #Location of pisg execuitable perl script
  10. set pisgexe "/home/nf/pisg/pisg"
  11. #URL of the generated stats
  12. set pisgurl "http://stats.nemesisforce.com/"
  13. #channel that the stats are generated for
  14. set pisgchan "#nemesisforce"
  15. #Users with these flags can operate this function
  16. set pisgflags "nm"
  17. #How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes
  18. set pisgtime "30"
  19. bind pub $pisgflags !stats pub:pisgcmd
  20. proc pub:pisgcmd {nick host hand chan arg} {
  21. global pisgexe pisgurl pisgchan
  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. }
  25. proc pisgcmd_timer {} {
  26. global pisgexe pisgurl pisgchan pisgtime
  27. append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
  28. puthelp $out
  29. timer $pisgtime pisgcmd_timer
  30. }
  31. if {![info exists {pisgset}]} {
  32. set pisgset 1
  33. timer 2 pisgcmd_timer
  34. }
  35. putlog "pisg.tcl $pisgver loaded"