This keeps track of words used in normal text and in action ( emotes ). It also tracks notices , nick changes , joins , parts and quits. It tracks them per nick and per channel.
It will work in 1 remote so no need to split it apart from itself.
A few examples below and the way to use it.
[23:49] !hcount
[23:49] Options are W (text), E (emote), J (join), P (part), Q (quit)
[23:49] Options are NI (nick), NO (notice), H (for help)
[23:49] The top 3 can be found using above except use top or topc for the top 3 list.
[23:49] Example: !wcount or !wcount nick , !<letter(s)>count topc/top[00:10] !wcount ShadowGoof
[00:10] Text count for "ShadowGoof" is 4,117
[00:11] !wcount #back-lot
[00:11] Text count for "#back-lot" is 1,156
[00:11] !wcount top
[00:11] [Text] [1] napa182 40,767 [2] Hawkee_Watcher 37,311 [3] Sick0 21,250
[00:11] !wcount topc
[00:11] [Text] [1] #Hawkee_Watcher 87,834 [2] #Lobby 76,072 [3] #goofstavern 12,000
on *:text:!*count*:#: {
$InfoTracker($event,$nick,$chan,$0)
if ($mid($1,2,1) = h) {
msg $chan Options are W (text), E (emote), J (join), P (part), Q (quit)
msg $chan Options are NI (nick), NO (notice), H (for help)
msg $chan The top 3 can be found using above except use top or topc for the top 3 list.
msg $chan Example: !wcount or !wcount nick , !<letter(s)>count topc/top
}
var %person $iif($2,$2,$nick)
if ($istok(w e j q p,$mid($1,2,1),32)) {
var %letter $replace($mid($1,2,1),e,Action,w,Text,j,Join,q,Quit,p,Part)
if ($istok(top topc,$2,32)) { $InfoTrackerTop(%letter,$2,$chan) }
else {
if ($left($2,1) != $chr(35)) { msg $chan %letter count for $qt(%person) is $comma($iif($hget(IT $+ %letter,%person),$v1,0)) }
if ($left($2,1) == $chr(35)) { msg $chan %letter count for $qt(%person) is $comma($iif($hget(ITC $+ %letter,%person),$v1,0)) }
}
}
if ($istok(ni no,$mid($1,2,2),32)) {
var %letter $replace($mid($1,2,2),ni,Nick,no,Notice)
if ($istok(top topc,$2,32)) { $InfoTrackerTop(%letter,$2,$chan) }
else {
if ($left($2,1) != $chr(35)) { msg $chan %letter $iif($mid($1,2,2) = ni,change) count for $qt(%person) is $comma($iif($hget(IT $+ %letter,%person),$v1,0)) }
if ($left($2,1) == $chr(35)) { msg $chan %letter $iif($mid($1,2,2) = ni,change) count for $qt(%person) is $comma($iif($hget(ITC $+ %letter,%person),$v1,0)) }
}
}
}
; $InfoTrackerTop($1,$2,$chan)
; $1 = %letter , $2 = top or topc
alias InfoTrackerTop {
var %top $iif($2 = topc,ITC,IT) $+ $1
var %d = 1 | window -hn $+(@,%top)
while $hget(%top,%d).item { aline $+(@,%top) $v1 $hget(%top,$v1) | inc %d }
filter -cteuww 2 32 $+(@,%top) $+(@,%top)
msg $chan $+([,$1,]) $&
[1] $iif($line($+(@,%top),1),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[2] $iif($line($+(@,%top),2),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[3] $iif($line($+(@,%top),3),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
window -c $+(@,%top)
}
;Usage: $comma(number)
alias comma {
var %a, %b = $regsub($ticks,$$1,/\G([+-]?\d+?)(?=(?:\d{3})++(?=\.\d++$|$))/g,\1 $+ $chr(44),%a)
return %a
}
on *:text:*:#: { $InfoTracker($event,$nick,$chan,$0) }
on *:action:*:#: { $InfoTracker($event,$nick,$chan,$0) }
on *:notice:*:*: {
hinc -m IT $+ $event $nick $0 | InfoTrackerSave
var %t 1 | while $comchan($nick,%t) { $InfoTracker($event,$v1,$0) | inc %t }
}
on *:part:*: { $InfoTracker($event,$nick,$chan) }
on *:join:*: { $InfoTracker($event,$nick,$chan) }
on *:quit: {
hinc -m IT $+ $event $nick 1 | InfoTrackerSave
var %t 1 | while $comchan($nick,%t) { $InfoTracker($event,$v1) | inc %t }
}
on *:nick: { $InfoTracker($event,$nick) }
; Usage: $InfoTracker($event,$nick,$chan,$0)
alias InfoTracker {
if ($1 = nick) { hinc -m IT $+ $1 $2 1 }
if ($1 = notice) { hinc -m ITC $+ $1 $2 $3 }
if ($istok(text action,$1,32)) { hinc -m IT $+ $1 $2 $4 | hinc -m ITC $+ $1 $3 $4 }
if ($istok(join part quit,$1,32)) {
if ($istok(join part,$1,32)) { hinc -m IT $+ $1 $2 1 | hinc -m ITC $+ $1 $3 1 }
if ($1 = quit) { hinc -m ITC $+ $1 $2 1 }
}
InfoTrackerSave
}
alias InfoTrackerSave {
hsave ITtext ITtext.hsh | hsave ITquit ITquit.hsh
hsave ITjoin ITjoin.hsh | hsave ITnotice ITnotice.hsh
hsave ITpart ITpart.hsh | hsave ITaction ITaction.hsh
hsave ITnick ITnick.hsh | hsave ITCtext ITCtext.hsh
hsave ITCquit ITCquit.hsh | hsave ITCjoin ITCjoin.hsh
hsave ITCnotice ITCnotice.hsh | hsave ITCpart ITCpart.hsh
hsave ITCaction ITCaction.hsh | hsave ITCnick ITCnick.hsh
}
Here you go
on *:text:!*count*:#: {
$InfoTracker($event,$nick,$chan,$0)
if ($mid($1,2,1) = h) {
msg $chan Options are W (text), E (emote), J (join), P (part), Q (quit)
msg $chan Options are NI (nick), NO (notice), H (for help)
msg $chan The top 3 can be found using above except use top or topc for the top 3 list.
msg $chan Example: !wcount or !wcount nick , !<letter(s)>count topc/top
}
var %person $iif($2,$2,$nick)
if ($istok(w e j q p,$mid($1,2,1),32)) {
var %letter $replace($mid($1,2,1),e,Action,w,Text,j,Join,q,Quit,p,Part)
if ($istok(top topc,$2,32)) { $InfoTrackerTop(%letter,$2,$chan) }
else {
if ($left($2,1) != $chr(35)) { msg $chan %letter count for $qt(%person) is $comma($iif($hget(IT $+ %letter,%person),$v1,0)) }
if ($left($2,1) == $chr(35)) { msg $chan %letter count for $qt(%person) is $comma($iif($hget(ITC $+ %letter,%person),$v1,0)) }
}
}
if ($istok(ni no,$mid($1,2,2),32)) {
var %letter $replace($mid($1,2,2),ni,Nick,no,Notice)
if ($istok(top topc,$2,32)) { $InfoTrackerTop(%letter,$2,$chan) }
else {
if ($left($2,1) != $chr(35)) { msg $chan %letter $iif($mid($1,2,2) = ni,change) count for $qt(%person) is $comma($iif($hget(IT $+ %letter,%person),$v1,0)) }
if ($left($2,1) == $chr(35)) { msg $chan %letter $iif($mid($1,2,2) = ni,change) count for $qt(%person) is $comma($iif($hget(ITC $+ %letter,%person),$v1,0)) }
}
}
}
; $InfoTrackerTop($1,$2,$chan)
; $1 = %letter , $2 = top or topc
alias InfoTrackerTop {
var %top $iif($2 = topc,ITC,IT) $+ $1
var %d = 1 | window -hn $+(@,%top)
while $hget(%top,%d).item { aline $+(@,%top) $v1 $hget(%top,$v1) | inc %d }
filter -cteuww 2 32 $+(@,%top) $+(@,%top)
msg $chan $+([,$1,]) $&
[1] $iif($line($+(@,%top),1),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[2] $iif($line($+(@,%top),2),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[3] $iif($line($+(@,%top),3),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[4] $iif($line($+(@,%top),4),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[5] $iif($line($+(@,%top),5),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[6] $iif($line($+(@,%top),6),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[7] $iif($line($+(@,%top),7),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[8] $iif($line($+(@,%top),8),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[9] $iif($line($+(@,%top),9),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[10] $iif($line($+(@,%top),10),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
window -c $+(@,%top)
}
;Usage: $comma(number)
alias comma {
var %a, %b = $regsub($ticks,$$1,/\G([+-]?\d+?)(?=(?:\d{3})++(?=\.\d++$|$))/g,\1 $+ $chr(44),%a)
return %a
}
on *:text:*:#: { $InfoTracker($event,$nick,$chan,$0) }
on *:action:*:#: { $InfoTracker($event,$nick,$chan,$0) }
on *:notice:*:*: {
hinc -m IT $+ $event $nick $0 | InfoTrackerSave
var %t 1 | while $comchan($nick,%t) { $InfoTracker($event,$v1,$0) | inc %t }
}
on *:part:*: { $InfoTracker($event,$nick,$chan) }
on *:join:*: { $InfoTracker($event,$nick,$chan) }
on *:quit: {
hinc -m IT $+ $event $nick 1 | InfoTrackerSave
var %t 1 | while $comchan($nick,%t) { $InfoTracker($event,$v1) | inc %t }
}
on *:nick: { $InfoTracker($event,$nick) }
; Usage: $InfoTracker($event,$nick,$chan,$0)
alias InfoTracker {
if ($1 = nick) { hinc -m IT $+ $1 $2 1 }
if ($1 = notice) { hinc -m ITC $+ $1 $2 $3 }
if ($istok(text action,$1,32)) { hinc -m IT $+ $1 $2 $4 | hinc -m ITC $+ $1 $3 $4 }
if ($istok(join part quit,$1,32)) {
if ($istok(join part,$1,32)) { hinc -m IT $+ $1 $2 1 | hinc -m ITC $+ $1 $3 1 }
if ($1 = quit) { hinc -m ITC $+ $1 $2 1 }
}
InfoTrackerSave
}
alias InfoTrackerSave {
hsave ITtext ITtext.hsh | hsave ITquit ITquit.hsh
hsave ITjoin ITjoin.hsh | hsave ITnotice ITnotice.hsh
hsave ITpart ITpart.hsh | hsave ITaction ITaction.hsh
hsave ITnick ITnick.hsh | hsave ITCtext ITCtext.hsh
hsave ITCquit ITCquit.hsh | hsave ITCjoin ITCjoin.hsh
hsave ITCnotice ITCnotice.hsh | hsave ITCpart ITCpart.hsh
hsave ITCaction ITCaction.hsh | hsave ITCnick ITCnick.hsh
}
@Jenny
To reset the info just do -> /hfree -w IT*
For a 10 ten list use the below bit for the InfoTrackerTop alias.
alias InfoTrackerTop {
var %top $iif($2 = topc,ITC,IT) $+ $1
var %d = 1 | window -hn $+(@,%top)
while $hget(%top,%d).item { aline $+(@,%top) $v1 $hget(%top,$v1) | inc %d }
filter -cteuww 2 32 $+(@,%top) $+(@,%top)
msg $chan $+([,$1,]) $&
[1] $iif($line($+(@,%top),1),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[2] $iif($line($+(@,%top),2),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[3] $iif($line($+(@,%top),3),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[4] $iif($line($+(@,%top),4),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[5] $iif($line($+(@,%top),5),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[6] $iif($line($+(@,%top),6),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[7] $iif($line($+(@,%top),7),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[8] $iif($line($+(@,%top),8),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None) $&
[9] $iif($line($+(@,%top),9),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
msg $chan $+([,$1,]) $&
[10] $iif($line($+(@,%top),10),$gettok($v1,1,32) $comma($gettok($v1,2,32)),None)
window -c $+(@,%top)
}