Top

User's stats on a channel


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 2 scores)
Date Added  Jun 13, 2005
Last Updated  Sep 04, 2008

Introduction

This will record how many lines/kicks/actions etc a user does
Right click over a users name and click [USER]'s stats
A dialog will pop up with thier stats

Warning: For this script to work, you must make a folder called "stats" in your mIRC folder. Without the folder called stats, the ini files will not write


Bear

Grab the Code

;Before pasting this script, make a folder called "stats" in your mIRC folder! 
menu nicklist {
  $1 $+ 's stats: /stat $1 $chan
}
alias stat {
  /set %chan $2 | /set %name $1
  /dialog -m stats stats
}
dialog stats {  
  option dbu
  title %name $+ 's stats
  size -1 -1 90 115
  text "Name:",2,5 10 70 10
  text "Channel:",3,5 20 70 10
  text "Lines: 0",4,5 40 50 10
  text "Actions: 0",5,5 50 50 10
  text "Joins: 0",6,5 60 50 10
  text "Parts: 0",7,5 70 50 10
  text "Kicked: 0",8,5 80 50 10
  text "Idle: 0 seconds",9,5 90 85 10
  text "User Mode:",10,5 30 50 10
  button "Ok",1,30 100 30 10, ok
}
on *:dialog:stats:init:0: {
  /did -o stats 2 1 Name: %name
  /did -o stats 3 1 Channel: %chan
  /did -o stats 4 1 Lines: $readini(stats/ $+ %chan $+ .ini,%name,lines)
  /did -o stats 5 1 Actions: $readini(stats/ $+ %chan $+ .ini,%name,actions)
  /did -o stats 6 1 Joins: $readini(stats/ $+ %chan $+ .ini,%name,joins)
  /did -o stats 7 1 Parts: $readini(stats/ $+ %chan $+ .ini,%name,parts)
  /did -o stats 8 1 Kicked: $readini(stats/ $+ %chan $+ .ini,%name,kicked)
  /did -o stats 9 1 Idle: $int($calc($nick(%chan,%name).idle / 60)) minutes, $calc($nick(%chan,%name).idle % 60) seconds
  /did -o stats 10 1 User mode: $remove($nick(%chan,%name).pnick,%name)
}
on *:text:*:#: { /incstat lines $chan $nick }
on *:action:*:#: { /incstat actions $chan $nick }
on *:kick:#: { /incstat kicked $chan $knick }
on *:part:#: { /incstat parts $chan $nick }
on *:join:#: { /incstat joins $chan $nick }
alias incstat { /writeini stats/ $+ $2 $+ .ini $3 $1 $calc($readini(stats/ $+ $2 $+ .ini,$3,$1) + 1) }
 

Comments

  (8)  RSS
xDaeMoN
Comments: 695
 
mIRC Snippet:  User's stats on a channel
Posted on Jun 13, 2005 3:07 pm
You could also make a check if the folder stats exists or not. If not, create a folder so the user does not have to create it manually.
xDaeMoN
Comments: 695
 
mIRC Snippet:  User's stats on a channel
Posted on Jun 13, 2005 3:18 pm
Since this is a users stats, I would recommend using hash tables.
DarthReven
Comments: 468
 
mIRC Snippet:  User's stats on a channel
Posted on Jun 13, 2005 5:20 pm
i'm not to big on stat scripts but this is nice and i to would use hash tables as xDaeMon pointed out
PCTech
Comments: 17
 
mIRC Snippet:  User's stats on a channel
Posted on Jun 23, 2005 1:10 pm
Would be nice if you had an option to echo the stats to the channel.
ryu.dragonryder
Comments: 21
 
mIRC Snippet:  User's stats on a channel
Posted on Dec 9, 2005 10:07 pm
i agree - are you able to update this with a hash table and make it so you can echo the users stats to the channel
(or maybe even !stats NoMeaDx ) heh
SweeTCooL
Comments: 18
 
mIRC Snippet:  User's stats on a channel
Posted on Aug 17, 2009 12:15 am
dude that will suck
it will say: * /writeini: too large: 'D:***\stats\#*****.ini' (line 40, *****.txt)
Jethro_
Comments: 437
 
mIRC Snippet:  User's stats on a channel
Posted on Aug 17, 2009 1:24 am
Quote:
it will say: * /writeini: too large: 'D:***\stats\#*****.ini' (line 40, *****.txt)
That is why it's best to covert this script into using hash tables, which can store unlimited amount of data.
SweeTCooL
Comments: 18
 
mIRC Snippet:  User's stats on a channel
Posted on Aug 17, 2009 3:33 pm
True!

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom