GLFTPD 를 사용하며
EGGDROP 을 이용하여 어나운싱을 하는 서버에서 사용할수 있는 스크립트 이다
DAYTOP 하루의 업로드 등수를 보여준다
사용방법은 아래의 소스를 복사하여 tcl 로 저장후에
eggdrop 에서 로드하여 주면 된다.
/glftpd/bin/stats 파일이 실행 가능한 퍼미션이어야 한다.
가능하지 않다면 고치길 바란다.
기본적으로 10명을 출력하게 끔 만들었으며
수정하고 싶다면
여기의 숫자 10을 변경하면 된다.
PS. 매우 허접한 스크립이니 보고나서 욕하지 말아주셨으면 합니다 ㅋㅋ
EGGDROP 을 이용하여 어나운싱을 하는 서버에서 사용할수 있는 스크립트 이다
DAYTOP 하루의 업로드 등수를 보여준다
사용방법은 아래의 소스를 복사하여 tcl 로 저장후에
eggdrop 에서 로드하여 주면 된다.
/glftpd/bin/stats 파일이 실행 가능한 퍼미션이어야 한다.
가능하지 않다면 고치길 바란다.
bind pub - !daytop pub:daytop
proc pub:daytop {nick output binary chan text} {
set binary {/glftpd/bin/stats}
set output [exec $binary -uwx 10]
set daytopout "DAYTOP :"
set activate 0
set rank 0
foreach line [split $output \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append daytopout " #$rank. \[ $user / $size / $speed \]"
}
}
putserv "PRIVMSG $chan :$daytopout"
}
putlog "DAYTOP v1.0 by Manu loaded"
proc pub:daytop {nick output binary chan text} {
set binary {/glftpd/bin/stats}
set output [exec $binary -uwx 10]
set daytopout "DAYTOP :"
set activate 0
set rank 0
foreach line [split $output \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append daytopout " #$rank. \[ $user / $size / $speed \]"
}
}
putserv "PRIVMSG $chan :$daytopout"
}
putlog "DAYTOP v1.0 by Manu loaded"
기본적으로 10명을 출력하게 끔 만들었으며
수정하고 싶다면
set output [exec $binary -uwx 10]
PS. 매우 허접한 스크립이니 보고나서 욕하지 말아주셨으면 합니다 ㅋㅋ
