ProIcons commented on a Page, Script that stores nicknames and IP addresses  -  Jul 05, 2013

First of all you can combine them to one JOIN alias

on *:JOIN:*: {  
  var %ip $gettok($wildsite,1-,46) 
  if (ustreamer !isin $nick ) {
    /write -a NicknameIPs.txt $nick $+ ~ $+ %ip
  }
  /echo 9 -t $chan new join $nick $+ $chr(32)  $+ ---- $+ $chr(32)  $+ $read(NicknameIPs.txt,w,%ip)
}

Second of all you can make it with INI Files, or even hash tables

Ini File Example:

on *:JOIN:*: {  
  var %ip $gettok($wildsite,1-,46) 
  if (ustreamer !isin $nick) {
    writeini -a NicknameIPs.ini %ip full $+($nick,~,%ip)
  }
  echo 9 -t $chan new join $nick ---- $readini(NicknameIPs.ini,%ip,full)
}

Hash Table Example:

on *:JOIN:*: {  
  if (!$hget(nickjoins)) { hmake nickjoins 100 | if ($exists(NicknameIPs.hash)) { hload nickjoins NicknameIPs.hash } | else { hsave nickjoins NicknameIPs.hash } }
  var %ip $gettok($wildsite,1-,46) 
  if (ustreamer !isin $nick) {
    hadd -m nickjoins %ip $+($nick,~,%ip)
    hsave nickjoins NicknameIPs.hash
  }
  echo 9 -t $chan new join $nick ---- $hget(nickjoins,%ip)
}
Truk  -  Jul 09, 2013

Thanks ProIcons!! I will mess with these more. Still a novice at this mIRC scripting.

ProIcons  -  Jul 09, 2013

Be noticed.
Speed:
HashTables > Variables > Ini Files.

HashTables loads extremely faster all the data since they are getting stored directly into your RAM Memory

Truk  -  Jul 09, 2013

One question. I did some reading on HashTables and assumed they were faster and I am using the HashTable atm, but will the results stored in the HashTable have to be regenerated each time mIRC is started?

Truk  -  Jul 09, 2013

Never mind that last stupid question - eyes @-@ are open now. Thanks Again!

ProIcons  -  Jul 09, 2013

In my example it checks if the hashtable exists, IF NOT creates one and then checks if there's a file containing the database then it is loading it into our hashtable, otherwise it is creating it.

So on each join stores to our Local Database the results, and ALSO stores all the hashtable into file(this make it SLOW) if you want to be faster, you can save the database on EXIT, anyway and then it retrieves the data from the db

Savage_CL  -  Aug 09, 2013

@ProIcons Thank you for that last bit about on EXIT. Else this script would become VERY slow when your counts ranged into the thousands and you were rewriting the entire text file every time (not to mention the wear on your drive >.>). Another option would be to save on exit and every 20 or so new records (incase mIRC crashes).

ProIcons  -  Aug 09, 2013

Just AppHang, not crash:D

Fundamental  -  Dec 01, 2018

How to see real ip? its show hidden ips
(01:22:47) Chris_Evans (Mibbit@773473.D54EC4.F95EB2.EE02AD) has joined #Chatroom
(01:22:47) |---› Chris_Evans~
!*@773473.D54EC4.F95EB2.EE02AD
how to see real ip address? if a person is ircop and wanted to see on join nick real ip instead of hidden cloak?

Sign in to comment

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.