From ba46c304bdffdce0b6019a47f6759ce6abbeef90 Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Tue, 16 Aug 2011 10:51:41 +0200 Subject: Initial commit --- eggdrop-pisg.tcl | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 eggdrop-pisg.tcl (limited to 'eggdrop-pisg.tcl') diff --git a/eggdrop-pisg.tcl b/eggdrop-pisg.tcl new file mode 100644 index 0000000..3069682 --- /dev/null +++ b/eggdrop-pisg.tcl @@ -0,0 +1,47 @@ +#pisg.tcl v0.15 by HM2K - auto stats script for pisg (perl irc statistics generator) +#based on a script by Arganan + +# WARNING - READ THIS +# +# If you use this script, PLEASE read the documentation about the "Silent" +# option. If you get the message "an error occured: Pisg v0.67 - perl irc +# statistics generator" in the channel, you are NOT running silent. Fix it. + +set pisgver "0.15" + +#Location of pisg execuitable perl script +set pisgexe "/home/eggdrop/eggdrop/pisg/pisg" + +#URL of the generated stats +set pisgurl "http://www.thehappy.de/habo/stats" + +#channel that the stats are generated for +set pisgchan "#hackerboard" + +#Users with these flags can operate this function +set pisgflags "nm" + +#How often the stats will be updated in minutes, ie: 30 - stats will be updated every 30 minutes +set pisgtime "1440" + +bind pub $pisgflags !stats pub:pisgcmd + +proc pub:pisgcmd {nick host hand chan arg} { + global pisgexe pisgurl pisgchan + append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" } + # puthelp $out +} + +proc pisgcmd_timer {} { + global pisgexe pisgurl pisgchan pisgtime + append out "PRIVMSG $pisgchan :" ; if {[catch {exec $pisgexe} error]} { append out "$pisgexe an error occured: [string totitle $error]" } else { append out "Stats Updated: $pisgurl" } + # puthelp $out + timer $pisgtime pisgcmd_timer +} + +if {![info exists {pisgset}]} { + set pisgset 1 + timer 2 pisgcmd_timer +} + +putlog "pisg.tcl $pisgver loaded" -- cgit v1.2.3