Quick little snippet for a small activity monitor in your toolbar. Makes it easy to see in a glance how active all the channels you are in are. Depending on how active your channels are, you may need to adjust the multiply and interval to keep the graph from being pegged.
Load it up and allow the start event to run, or type /activity_mon_start
to remove: /activity_mon_stop
;Version Change Log:
/*
V 1.0.0 -- Initial Release (Oct 09, 2011)
V 1.0.1 -- Minor Update (Oct 09, 2011)
*/
; +-+-+-+-+-+-+-+-+-+-+-+-+-+
; + mIRC Activity Monitor +
; + Author: Imrac +
; + Version: 1.0.2 +
; + Date: Oct 09, 2011 +
; +-+-+-+-+-+-+-+-+-+-+-+-+-+
;Version Change Log:
/*
V 1.0.0 -- Initial Release (Oct 09, 2011)
V 1.0.1 -- Minor Update (Oct 09, 2011)
* Added unload to cleanup what we left behind (thanks pball)
* Changed join * to join # (thanks jethro)
V 1.0.2 -- Minor Update (Oct 09, 2011)
* Changed part * to part # (thanks frenetic)
*/
; adjust multiplyer depending on how active your channels are. (higher the number the less active)
alias -l act_multi { return 3 }
alias -l act_interval { return 5000 }
alias -l act_color_border { return $rgb(0,0,0) }
; transparent background = $rgb(255,0,255)
alias -l act_color_background { return $rgb(100,100,100) }
alias -l act_color_foreground { return $rgb(181,230,29) }
alias activity_mon_start {
if (!$window(@drawactivity)) { window -pBwh +d @drawactivity -1 -1 80 16 }
drawrect -rnf @drawactivity $act_color_background 1 0 0 80 16
drawrect -rn @drawactivity $act_color_border 1 0 0 80 16
drawrect @drawactivity
if (!$toolbar(activity)) { toolbar -au activity "Activity Monitor" @drawactivity }
.timerdraw -om 1 25 act_drawer $ticks
}
alias activity_mon_stop {
if ($window(@drawactivity)) { window -c @drawactivity }
if ($toolbar(activity)) { toolbar -d activity }
.timerdraw off
unset %activity
}
alias -l act_drawer {
var %last = $1
var %cur = $ticks
if ($calc(%cur - %last) >= $act_interval) {
if ((!$toolbar(activity)) || (!$window(@drawactivity))) { activity_mon_start }
drawscroll -n @drawactivity -1 0 1 1 78 14
drawline -rn @drawactivity $act_color_background 1 78 14 78 0
drawline -rn @drawactivity $act_color_foreground 1 78 14 78 $calc(13 - (1 * $iif(%activity > 13,13,$v1)))
drawdot @drawactivity
toolbar -up activity @drawactivity
%last = %cur
%activity = $floor($calc(%activity * 3 / 4))
}
.timerdraw -om 1 25 act_drawer %last
}
on *:text:*:*:{ inc %activity $act_multi }
on *:action:*:*:{ inc %activity $act_multi }
on *:notice:*:*:{ inc %activity $act_multi }
on *:join:#:{ inc %activity $act_multi }
on *:rawmode:*:{ inc %activity $act_multi }
on *:nick:{ inc %activity $act_multi }
on *:part:#:{ inc %activity $act_multi }
on *:quit:{ inc %activity $act_multi }
on *:start:{ activity_mon_start }
on *:unload:{ activity_mon_stop }