This will open the second editbox on all channels and use that to display the number of users in that channel plus an activity indicator.
This is my first script and just the first version of it. I'll probably fine tune it.
EDIT: This is the second version, I made it server aware and fine tuned some things. Will keep this updated as I improve it.
EDIT: third version shows words per minute instead of a meaningless number. Also press F2 for an activity overview of all open channels.
EDIT: now channels that don't get any activity for a while are deleted from the activity list.
;ActivityMonitor by Tritonio
alias reduceactivity {
var %i = 1
while ($hget(activity, %i).item) {
var %t = $calc($hget(activity, $v1) * %decay)
hadd activity $v1 %t
inc %i
}
var %i = 1
while ($hget(activity, %i).item) {
var %j = $v1
var %t = $calc($wpm($hget(activity, $v1)))
if (%t < 0.009) {
hdel activity %j
break
}
inc %i
}
showactivity $active $activecid
}
alias F2 {
var %i = 1
echo 7 -g -------------------------
echo 7 -g Activity in open channels
while ($hget(activity, %i).item) {
var %a = $hget(activity,$v1)
echo 7 -g $round($wpm(%a),2) wpm in $v1
inc %i
}
echo 7 -g -------------------------
}
alias wpm {
return $calc(($1 - $1 * %decay ^ 2)/(2 * %decay)*60)
}
alias showactivity {
scid $2
var %a = $hget(activity,$+($2,$1))
editbox -oq1 $1 $1 $+ : $nick($1,0) Activity: $round($wpm(%a),2) wpm
}
alias resetactivitytable {
hfree activity
hmake activity 15
}
on *:START:{
hmake activity 15
set -e %decay 0.995
timer -io 0 1 /reduceactivity
}
on *:JOIN:#: {
showactivity $chan $cid
}
on *:PART:#: {
showactivity $chan $cid
}
on *:ACTIVE:#: {
showactivity $active $activecid
}
on *:TEXT:*:#: {
hadd activity $+($cid,$chan) $calc( $hget(activity, $+($cid,$chan) ) + $0)
}
on 1:INPUT:#: {
if ($left($1,1) != / ) hadd activity $+($cid,$chan) $calc( $hget(activity, $+($cid,$chan) ) + $0)
You mean the toolbar with the buttons for connecting/disconnecting etc? AFAIK no... I'll check the help manual.
Also I'll update the code in a minute. It now shows an estimate of words per minute as an activity score instead of a meaningless number. Behind the scenes it's the same thing. You can find me on freenode ##mirc btw.