Project

General

Profile

Statusbar irc connection stats v0.1

Added by Mr. BS almost 9 years ago

Networks and channels stats info on statusbar.

on *:Load: stats
on *:Unload: statusbar -d statsep | statusbar -d stats | unset %stats.chans
on *:Start: stats
on me:*:Join:#: inc -e %stats.chans | stats
on me:*:Part:#: dec -e %stats.chans | stats
on *:Connect: stats
on *:Disconnect: forceupdate | stats

alias stats {
  if (!%stats.chans) forceupdate 
  var %fullstats ⿻ Connection Stats ⿻ Networks: $scon(0) - Chans: %stats.chans ⿻
  if ($isid) return %fullstats
  if (!$statusbar(stats)) { statusbar -a statsep "" "" $chr(160) | statusbar -aj stats "" stats "/action $!stats" $chr(160) }
  statusbar -t stats %fullstats | statusbar -g stats N: $scon(0) C: %stats.chans
}

alias -l forceupdate {
  set %c 0 |  tokenize 46 $+(%,c) $!chan(0) | scon -a inc $* | set -e %stats.chans %c | unset %c
}

menu stats {
  $iif($istok(channel query,$window($active).type,32),Send to window) : action $stats
  -
  Force update: forceupdate | stats
}