-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy patheggdrop-pisg.tcl
47 lines (35 loc) · 1.49 KB
/
eggdrop-pisg.tcl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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.1"
#Location of pisg execuitable perl script
set pisgexe "/home/example/pisg/pisg"
#URL of the generated stats
set pisgurl "http://stats.example.com/"
#channel that the stats are generated for
set pisgchan "#example"
#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 "30"
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"