I'm currently trying to make a script that will count the voiced users in a specific chan, and also count the lines of a vertain file, and then display them both in one line like
There are x users and there are x lines in the file.
Thats just a short rundown, this is what I have so far.
bind pub - !stats voiced
proc voiced {nick uhost hand chan arg} {
set i 0
set cname #chan
foreach n [chanlist $cname] {
if {[isvoice $n $cname]} { incr i }
}
puthelp "privmsg $chan :There are currently $i voices online!"
}
bind pub - !stats voiced
proc voiced {nick uhost hand chan arg} {
set i 0
set cname #chan
foreach n [chanlist $cname] {
if { [isvoice $n $cname] } {
incr i
}
}
set fname "path/to/file.txt"
set fs [open $fname r]
set data [read $fs]
close $fs
set lines [split $data \n]
set length [llength $lines]
puthelp "PRIVMSG $chan :There are currently $i voices online and $length lines in ${fname}!"
return
}