Ircstats 1.0 by ScReEmO-KiD

By ScReEmO-KiD on Jun 16, 2009

This is my 1st ircstats script that ive made. Unfortunately it requires you to do one thing after loading before it works. Create the following sub folder -
D:\Documents and Settings\user\Application Data\mIRC\ircstats
Then it should work =) this is my 1st script that i have uploaded feedback would be greatly appreciated.

The commands are
(1). !ircstats
(2). !ircstats

(1): to check your own stats. .
(2): to check someone elses stats.

The script tells you the amount of words typed, sentences, bans, banned, kicks, kicked

; Ircstats 1.0                |
; Written by ScReEmO-KiD      |
; #screamo |

on *:text:*:#: {
  if ($1 != !ircstats) {
    var %words = $calc( $numtok($1-,32) + $ircstats(words) ) 
    var %sentences = $calc( $ircstats(sentences) + 1 ) 
    .writeini ircstats\ $+ $nick $+ .ini $nick Words %words
    .writeini ircstats\ $+ $nick $+ .ini $nick sentences %sentences  
  if ($1 == !ircstats) {
    if ($2 = $null) { var %nm = $nick }
    if ($2 != $null) { var %nm = $2 } 
    if ($stats(words,%nm) = $null) {
      msg $chan 1,14[ERROR]: No stats for, %nm $+ . 
    if ($stats(words,%nm) != $null) {
      .msg $chan 1,14  [IRC Stats for %nm $+ ] [Lines of text: $stats(sentences,%nm) $+ ] [Total words: $stats(words,%nm) $+ ] [Times kicked out: $stats(kicked,%nm) $+ ] [Users kicked: $stats(kicks,%nm) $+ ] [Users banned: $stats(bans,%nm) $+ ] [Times banned: $stats(banned,%nm) $+ ]   

alias stats { return $readini(ircstats\ $+ $2 $+ .ini,$2,$1) }

alias ircstats { return $readini(ircstats\ $+ $nick $+ .ini,$nick,$1) }

on *:kick:#: {
  var %kicked = $calc( $stats(kicked,$knick) + 1 )
  .writeini ircstats\ $+ $knick $+ .ini $knick kicked %kicked 
  var %kicks = $calc( $ircstats(kicks) + 1 )
  .writeini ircstats\ $+ $nick $+ .ini $nick kicks %kicks

on *:ban:#: {
  var %banned = $calc( $stats(banned,$bnick) + 1 )
  .writeini ircstats\ $+ $bnick $+ .ini $bnick banned %banned
  var %bans = $calc( $ircstats(bans) + 1 )
  .writeini ircstats\ $+ $nick $+ .ini $nick bans %bans


Sign in to comment.
Xavia   -  Aug 22, 2011

What is the difference Jethro_ ?

<-- Its a NUUB

Jethro   -  Aug 22, 2011

You should have added the -n switch for your writeini command so mIRC will attempt to extend its default size.

Xavia   -  Aug 22, 2011

Can you make it, so its count letters/charaters also? :)

I love this script, i use it on my own BOT, can use the .INI file, thats good :)

ScReEmO-KiD   -  Jun 23, 2009

(^^,) lol soz man i kinda got carried away with my mircscript game that ive been making for some time. i just converted it to hash tables :)i use to use .ini's so havnt got around to the ircstats script yet :)

napa182   -  Jun 19, 2009

no need to use loops for saving hash
i made one ueing hash a few days ago

this is from the one i made this is the save an load

on *:disconnect:{ .hsave ircstats $qt($scriptdirircstats.hsh) } 
on *:exit:{ .hsave ircstats $qt($scriptdirircstats.hsh) }
on *:start:{ if (!$hget(ircstats)) { .hmake ircstats 1000 | .hload ircstats $qt($scriptdirircstats.hsh) } }
on *:load:{ if (!$hget(ircstats)) { .hmake ircstats 1000 | .hload ircstats $qt($scriptdirircstats.hsh) } }
ScReEmO-KiD   -  Jun 19, 2009

Its taking a little longer than expected to make it using hash tables... reason being i havnt used it before i am managing tho. Just having some problems with the saving/loading need to use loops =/

napa182   -  Jun 17, 2009

ScReEmO-KiD Said:

It creates a seperate .ini for each $nick. $nick.ini for example.

um still thats alot of ini files if you have alot of people in ur room =/ , but good luck on ur hash version of it.

ScReEmO-KiD   -  Jun 17, 2009

I shall make a hash one right away ^^ although i dont see what you mean by "you should go with hash for this cuz the ini file will fill up fast." It creates a seperate .ini for each $nick. $nick.ini for example.

I apreaciate the feedback napa182.
I am going to make a hash one, will be awaiting your feedback on the hash one as soon as im done.

napa182   -  Jun 16, 2009

you should go with hash for this cuz the ini file will fill up fast.

also for the count of words you could use


instead of useing


an if they use color it wont count. and all i get is

[ERROR]: No stats for, napa182.

so should really have it make the ini file on load of the script.

Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.