rendered paste bodyon $*:TEXT:/^[@!.]ircstats.*$/Si:#:{
/var %target $iif($left($1,1) == @,msg $chan,.notice $nick)
if (!$2) {
var %nm = $nick
}
else {
var %nm = $2
}
if (!$read(ircstats.txt,w,%nm *)) {
%target Sorry, $nick $+ , but I do not have any stats info for %nm $+ . Try another name, maybe?
}
else {
var %line = $gettok($read(ircstats.txt,w,%nm *),2-,32)
tokenize 32 %line
%target 10[14IRC Stats for %nm $+ 10] [14Lines of text: $iif($1,$1,0) $+ 10] [14Actions: $iif($2,$2,0) $+ 10] [14Total Words: $iif($7,$7,0) $+ 10] [14Users kicked: $iif($3,$3,0) $+ 10] [14Times kicked out: $iif($4,$4,0) $+ 10] [14Users Banned: $iif($5,$5,0) $+ 10] [14Times Banned: $iif($6,$6,0) $+ 10]
}
}
on *:TEXT:*:#:{
var %line = $gettok($read(ircstats.txt,w,$nick *),2-,32), %words = $numtok($1-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick *)) {
write ircstats.txt $nick 1 0 0 0 0 0 %words
}
else {
write -dw" $+ $nick *" ircstats.txt
write ircstats.txt $nick $calc($1 + 1) $2-6 $calc($7 + %words)
}
}
on *:ACTION:*:#:{
var %line = $gettok($read(ircstats.txt,w,$nick *),2-,32), %words = $numtok($1-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick *)) {
write ircstats.txt $nick 0 1 0 0 0 0 %words
}
else {
write -dw" $+ $nick *" ircstats.txt
write ircstats.txt $nick $1 $calc($2 + 1) $3-6 $calc($7 + %words)
}
}
on *:KICK:#:{
var %line = $gettok($read(ircstats.txt,w,$nick *),2-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick *)) {
write ircstats.txt $nick 0 0 1 0 0 0 0
}
else {
write -dw" $+ $nick *" ircstats.txt
write ircstats.txt $nick $1-2 $calc($3 + 1) $4-
}
%line = $gettok($read(ircstats.txt,w,$knick *),2-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$knick *)) {
write ircstats.txt $knick 0 0 0 1 0 0 0
}
else {
write -dw" $+ $knick *" ircstats.txt
write ircstats.txt $knick $1-3 $calc($4 + 1) $5-
}
}
on *:BAN:#:{
var %line = $gettok($read(ircstats.txt,w,$nick *),2-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick *)) {
write ircstats.txt $nick 0 0 0 0 1 0 0
}
else {
write -dw" $+ $nick *" ircstats.txt
write ircstats.txt $nick $1-4 $calc($5 + 1) $6-
}
var %i = 1
while ($nick($chan,%i)) {
if ($banmask iswm $address($nick($chan,%i),5)) {
%line = $gettok($read(ircstats.txt,w,$nick($chan,%i) *),2-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick($chan,%i) *)) {
write ircstats.txt $nick($chan,%i) 0 0 0 0 0 1 0
}
else {
write -dw" $+ $nick($chan,%i) *" ircstats.txt
write ircstats.txt $nick($chan,%i) $1-5 $calc($6 + 1) $7-
}
}
inc %i
}
}
on *:NICK:{
var %line = $gettok($read(ircstats.txt,w,$nick *),2-,32)
tokenize 32 %line
if (!$read(ircstats.txt,w,$nick *)) {
write ircstats.txt $newnick 0 0 0 0 0 0 0
}
else {
write -dw" $+ $nick *" ircstats.txt
write ircstats.txt $newnick $1-
}
}