# Скрипт выводит список наиболее используемых публичных команд.
# http://70region.ru
# miniscript by Deniska
# сколько команд выводить в топе. По умолчанию 5
set topcomlimit 5
bind pub o|o !topcmd pub:topcommands
proc pub:topcommands { nick uhost hand chan text } {
set comlist [binds pub]
lsort -index 3 $comlist
if { [lindex [lindex $comlist 0] 3] == 0 } {
putserv "privmsg $chan :\00314Командами не пользуются.. Похоже я никому не нужен.. ):"
return
}
putserv "privmsg $chan :\00314Наиболее используемые команды:"
if { [llength $comlist] < $::topcomlimit } {
set limit [llength $comlist]
} else {
set limit $::topcomlimit
}
set i 0
foreach b $comlist {
if { [lindex $b 2] == "!topcmd" } { continue }
if { $i == $limit } { return }
if { [lindex $b 3] == 0 } { return }
if { [lindex $b 1] == "-|-" } {
putserv "privmsg $chan :\00303\[\00304[lindex $b 3]\00303\] \00307[lindex $b 2]"
incr i
}
}
}
putlog "topcommands.tcl v1.0 by Deniska loaded"Немного подкрасил скрипт.











