User's stats on a channel

By bearruler on Jun 13, 2005

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

;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

Sign in to comment.
SweeTCooL   -  Aug 17, 2009

True!

 Respond  
Jethro   -  Aug 17, 2009

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.

 Respond  
SweeTCooL   -  Aug 17, 2009

dude that will suck
it will say: * /writeini: too large: 'D:*\stats#***.ini' (line 40, *****.txt)

 Respond  
ryu.dragonryder   -  Dec 09, 2005

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

 Respond  
PCTech   -  Jun 23, 2005

Would be nice if you had an option to echo the stats to the channel.

 Respond  
DarthReven   -  Jun 13, 2005

i\'m not to big on stat scripts but this is nice and i to would use hash tables as xDaeMon pointed out

 Respond  
xDaeMoN   -  Jun 13, 2005

Since this is a users stats, I would recommend using hash tables.

 Respond  
xDaeMoN   -  Jun 13, 2005

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.

 Respond  
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.