GLFTPD 를 사용하며
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"


기본적으로 10명을 출력하게 끔 만들었으며
수정하고 싶다면
set output [exec $binary -uwx 10]
여기의 숫자 10을 변경하면 된다.

PS. 매우 허접한 스크립이니 보고나서 욕하지 말아주셨으면 합니다 ㅋㅋ
2004/09/14 02:50 2004/09/14 02:50
Posted by 마누
트랙백 0 : 댓글 0 댓글을 작성하시려면 클릭하세요

트랙백 보낼 주소 : http://manuz.com/trackback/41


행복합니다^^
행복합니다. 김형원이 운영하는 블로그 입니다. 제가 쓴 글과 영상들이 있고 웹관련 정보들이 있습니다.

카테고리

전체 (159)
Life Story.. (46)
Love Story.. (2)
Meditation with Life (41)
Web Accesiblity (1)
Writing (2)
Meditation (15)
WEB (11)
IT (31)
Movie Clip (UCC) (8)

글 보관함

달력

«   2012/02   »
      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      
Total : 300110
Today : 35 Yesterday : 223