Join Counter (Nick Based)

By xDaeMoN on Mar 07, 2005

An join counter that counts the number of unique nicknames joining the channel. When a nick joins the channel again, it will tell them how many times they have visited the channel. This will also tell them when they last visited the channel. Now uses hash tables & Multi-server capable.

on *:START: { 
  hmake jcount 100 
  if ($isfile(jcount.dat)) hload jcount jcount.dat 
} 

on *:EXIT: hsave -o jcount jcount.dat 

on !*:JOIN:#: {
  if ( $hget(jcount,$+($network,.,$chan,.,$nick)) ) {
    tokenize 32 $v1
    var %t = $calc($1 + 1)
    .msg $chan Welcome Back $nick $+ . Last time you joined $chan was on $2 $+ , $duration($calc($ctime - $3)) ago $+ . (Your total visits: %t $+ )
    hadd -m jcount $+($network,.,$chan,.,$nick) %t $asctime(mm/dd/yyyy) $ctime
  }
  else { 
    hinc -m jcount $+($network,.,$chan,.,total.count)
    .msg $chan Welcome $nick $+ ! You're visitor $chr(35) $+ $hget(jcount,$+($network,.,$chan,.,total.count)) to join $chan $+ .
    hadd -m jcount $+($network,.,$chan,.,$nick) 1 $asctime(mm/dd/yyyy) $ctime
  }
}
Sign in to comment.
Jethro   -  Sep 17, 2011

Xavia, you can save the hash table as an ini file using the -i switch, so they will be saved in a INI format. Then load it the same with the -i switch for /hload. I know you want to be able to see what you have added.

 Respond  
Xavia   -  Sep 17, 2011

can someone make it to write in .ini files?

 Respond  
booth   -  Jul 13, 2009

Nice Script... Thanks

 Respond  
Jethro   -  Jun 18, 2009

You can add a timer to save the join count every few seconds. (It'll overwrite the jcount.dat with the latest info) This way, you don't have to worry about losing it:

on *:START: { 
  hmake jcount 100 
  if ($isfile(jcount.dat)) hload jcount jcount.dat 
  .timerjcount 0 15 hsave -o jcount jcount.dat
}

I put it for saving every 15 seconds, but you can put any second of your choice that you see fit. The shorter the second, the frequency of saving it becomes.

 Respond  
F*U*R*B*Y*   -  Jun 17, 2009

Here's a fix, exit mIRC then reboot....

 Respond  
Cheiron   -  Jun 16, 2009

bump to see if anyone has an idea

 Respond  
Cheiron   -  Jun 06, 2009

found an issue where if you reboot , it loses count.. any chance of a fix

 Respond  
Tyler222   -  Jun 13, 2007

Great Script.

 Respond  
DarthReven   -  Jan 21, 2007

you can actually cut out the $asctime(mm/dd/yyyy) cause $ctime will return the date when you use $asctime($ctime)

 Respond  
Krobeluskill   -  Jan 21, 2007

Uh, nice hash table work. The help file doesn\'t show enough information for the thing I want it to do :/

 Respond  
xDaeMoN   -  Jan 20, 2007

Remove me? lol. Just remove the parts where it shows the channel. I know you can do it. hehe

 Respond  
Opasna-Bagra   -  Jan 20, 2007

why i remove that part ... remove you :-)

 Respond  
xDaeMoN   -  Jan 19, 2007

Find that part in the code then remove it ;)

 Respond  
Opasna-Bagra   -  Jan 19, 2007

maybe :) and remove # You are Visitor #number on channel! because i type # they ban me ! # in any channels is set in BadWord

 Respond  
xDaeMoN   -  Jan 19, 2007

Big lag? Unless there are a lot of users joining your channels OR maybe your other scripts it causing the lag.

 Respond  
Opasna-Bagra   -  Jan 19, 2007

this snippet is a nearly year old ... nice snippet but when i load on my script i have big lag... :S

 Respond  
A-1-T-E-A-M   -  Jan 17, 2007

yeah now i see that i didnt see when i open to see this snippet

 Respond  
F*U*R*B*Y*   -  Jan 17, 2007

i know.... thats why i said NEARLY A YEAR OLD

 Respond  
A-1-T-E-A-M   -  Jan 17, 2007

Date Added: Mar 07, 2005 Last Updated: Sep 19, 2005

yeah FURBY* this addon is added nearly a year old

 Respond  
F*U*R*B*Y*   -  Jan 17, 2007

bahh nearly a year old

 Respond  
A-1-T-E-A-M   -  Jan 17, 2007

xDaeMoN nice count

 Respond  
realmadrid_rocks   -  Jan 17, 2007

yay workd..thnx

 Respond  
S4br3W0lf   -  Mar 27, 2006

Very nice i think ill use it :D

 Respond  
xDaeMoN   -  May 20, 2005

Updated. Now uses hash tables & multi-server capable.

 Respond  
xDaeMoN   -  May 13, 2005

Yes it works fine. It was tested on 6.16.

 Respond  
webbie   -  May 07, 2005

is this date and time count wright I teste the script after I loaded it and it dus not count the time and date wright[22:00] <@test> Welcome Back web-buddy. Last time you joined #mosselbaai was on , 1844wks 2days 20hrs 3secs ago. (Your total visits: 1)

 Respond  
Ville   -  Mar 23, 2005

Good job.

 Respond  
undertaker11   -  Mar 22, 2005

very nice script!

 Respond  
supergeo   -  Mar 13, 2005
 Respond  
xDaeMoN   -  Mar 10, 2005

Updated. Added date the nick last joined the channel.

 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.