GLFTPD 를 사용하며
EGGDROP 을 이용하여 어나운싱을 하는 서버에서 사용할수 있는 스크립트 이다
GL 서버에서의 자신의 월업로드랭킹 주업로드랭킹 일업로드랭킹을 보여준다
사용방법은 아래의 소스를 복사하여 tcl 로 저장후에
eggdrop 에서 로드하여 주면 된다.
/glftpd/bin/stats 파일이 실행 가능한 퍼미션이어야 한다.
가능하지 않다면 고치길 바란다.
이 스크립은 서버유저가 100 명 이하일 경우를 생각해서 만들었다
100 명을 넘는다면
위 부분의 숫자 100 을 서버유저보다 많게 고쳐서 사용하면 된다.
EGGDROP 을 이용하여 어나운싱을 하는 서버에서 사용할수 있는 스크립트 이다
GL 서버에서의 자신의 월업로드랭킹 주업로드랭킹 일업로드랭킹을 보여준다
사용방법은 아래의 소스를 복사하여 tcl 로 저장후에
eggdrop 에서 로드하여 주면 된다.
/glftpd/bin/stats 파일이 실행 가능한 퍼미션이어야 한다.
가능하지 않다면 고치길 바란다.
bind pub - !rank pub:rank
proc pub:rank {nick output binary chan text} {
set binary {/glftpd/bin/stats}
set mooutput [exec $binary -umx 100]
set weoutput [exec $binary -uwx 100]
set daoutput [exec $binary -utx 100]
set ranktitle "$text RANK :"
set rankout ""
set activate 0
set moactivate 0
set weactivate 0
set daavtivate 0
set rank 0
foreach line [split $mooutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Month Up #$rank. \[ $size \]"
set moactivate 1
set activate 0
break
}
}
}
foreach line [split $weoutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Week Up #$rank. \[ $size \]"
set weactivate 1
set activate 0
break
}
}
}
foreach line [split $daoutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Day Up #$rank. \[ $size \]"
set daactivate 1
set activate 0
break
}
}
}
if {$rankout==""} {
putserv "PRIVMSG $chan :RANK : $text is not our user. :P"
return 0
}
putserv "PRIVMSG $chan :$ranktitle $rankout"
}
putlog "RANKCHECK v1.0 by Manu loaded"
proc pub:rank {nick output binary chan text} {
set binary {/glftpd/bin/stats}
set mooutput [exec $binary -umx 100]
set weoutput [exec $binary -uwx 100]
set daoutput [exec $binary -utx 100]
set ranktitle "$text RANK :"
set rankout ""
set activate 0
set moactivate 0
set weactivate 0
set daavtivate 0
set rank 0
foreach line [split $mooutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Month Up #$rank. \[ $size \]"
set moactivate 1
set activate 0
break
}
}
}
foreach line [split $weoutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Week Up #$rank. \[ $size \]"
set weactivate 1
set activate 0
break
}
}
}
foreach line [split $daoutput \n] {
regsub -all {\[|\]} $line "" line
if {[string match *\[01\]* $line]} {
set activate 1
}
if {$activate==1} {
incr rank
set user [lindex $line 1]
if {$user==$text} {
set speed [lindex $line end]
regsub -all $speed $line "" line
set size [lindex $line end]
append rankout " Day Up #$rank. \[ $size \]"
set daactivate 1
set activate 0
break
}
}
}
if {$rankout==""} {
putserv "PRIVMSG $chan :RANK : $text is not our user. :P"
return 0
}
putserv "PRIVMSG $chan :$ranktitle $rankout"
}
putlog "RANKCHECK v1.0 by Manu loaded"
이 스크립은 서버유저가 100 명 이하일 경우를 생각해서 만들었다
100 명을 넘는다면
set mooutput [exec $binary -umx 100]
set weoutput [exec $binary -uwx 100]
set daoutput [exec $binary -utx 100]
set weoutput [exec $binary -uwx 100]
set daoutput [exec $binary -utx 100]
위 부분의 숫자 100 을 서버유저보다 많게 고쳐서 사용하면 된다.
