-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tur-oneline_stats.tcl
40 lines (28 loc) · 1.2 KB
/
tur-oneline_stats.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
##############################################################################
# tur-oneline_stats.tcl 1.0 by Turranius tweaked by Teqno #
##############################################################################
bind pub -|- !top pub:tur-onelinemnup
set turonelinestatsbinary "/glftpd/bin/tur-oneline_stats.sh"
proc pub:tur-onelinemnup {nick output binary chan text} {
global turonelinestatsbinary
if {$text == ""} {
putquick "PRIVMSG $chan :Getting information, please wait..."
putquick "PRIVMSG $chan :This Month Top 10 Stats (Upload)"
foreach line [split [exec $turonelinestatsbinary -m -u -x 10] "\n"] {
putquick "PRIVMSG $chan :$line"
}
}
if {$text != ""} {
if {$text >= "31"} {
putquick "PRIVMSG $chan :Max 30 results are allowed"
}
if {$text <= "30"} {
putquick "PRIVMSG $chan :Getting information, please wait..."
putquick "PRIVMSG $chan :This Month Top $text Stats (Upload)"
foreach line [split [exec $turonelinestatsbinary -m -u -x $text] "\n"] {
putquick "PRIVMSG $chan :$line"
}
}
}
}
putlog "Tur-Oneline_Stats.tcl 1.0 by Turranius loaded"