4
0

eggdrop-pisg.tcl 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. # Don't complain to the pisg authors, or you will be flamed.
  9. #
  10. # IF YOU DON'T GET THIS RIGHT, PLEASE CONSIDER LETTING SOMEONE ELSE
  11. # ADMINISTRATE YOUR BOT.
  12. set pisgver "0.15"
  13. #Location of pisg execuitable perl script
  14. set pisgexe "/home/nf/pisg/pisg"
  15. #URL of the generated stats
  16. set pisgurl "http://stats.nemesisforce.com/"
  17. #channel that the stats are generated for
  18. set pisgchan "#nemesisforce"
  19. #Users with these flags can operate this function
  20. set pisgflags "nm"
  21. #How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes
  22. set pisgtime "30"
  23. bind pub $pisgflags !stats pub:pisgcmd
  24. proc pub:pisgcmd {nick host hand chan arg} {
  25. global pisgexe pisgurl pisgchan
  26. append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
  27. puthelp $out
  28. }
  29. proc pisgcmd_timer {} {
  30. global pisgexe pisgurl pisgchan pisgtime
  31. append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" }
  32. puthelp $out
  33. timer $pisgtime pisgcmd_timer
  34. }
  35. if {![info exists {pisgset}]} {
  36. set pisgset 1
  37. timer 2 pisgcmd_timer
  38. }
  39. putlog "pisg.tcl $pisgver loaded"