Lurker/Snoop Alert

By Truk on Feb 12, 2015

This script was made for the ustream network. For it to work on other networks you will need to modify it to work with other networks.
It was made so I can see nicknames for those joining chat but not logging in to the chats I am on. It also offers a quick look "Lurker Alert" look-up from a right click menu.

Instructions for loading are in the script below. Copy and paste everything below this and put it in a new Remote.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Lurker Alert Script Version 1.0                            ;;;
;;; This script is good for announcing chatters nicknames when ;;;
;;; they join if they do not nickup/login - thus the           ;;;
;;; Lurker Alert Name                                          ;;;
;;;------------------------------------------------------------;;;
;;; Thanks to LozoCN for his help with the "Lurker Lookup"     ;;;
;;; Look up LozoCN on Twitter @LozoCN.  He has a 24/7 Live     ;;;
;;; music broadcast.                                           ;;;
;;;------------------------------------------------------------;;;
;;; Script modifications/bug testing done by jollygiantredwood ;;;
;;;------------------------------------------------------------;;;
;;; "Lurker Lookup" will display the unvoiced/un-nicked up     ;;;
;;; chatters nickname if it is stored in your nicktrack file   ;;;
;;; that this script creates and adds nicknames to each time a ;;;
;;; chatter logs in to any chat you are in.                    ;;;
;;; You can also right click on an unvoiced/un-nicked up       ;;;
;;; chatter in the chatter list and select "Lurker Lookup" and ;;;
;;; the same results will echo to you in chat.                 ;;;
;;;------------------------------------------------------------;;;
;;; UNDERSTAND THAT THIS SCRIPT HAS TO BUILD UP THE nicktrack  ;;;
;;; HASH TABLE AND IT WILL TAKE TIME BEFORE IT STARTS TO SHOW  ;;;
;;; RESULTS.                                                   ;;;
;;; SO DON'T LEAVE COMENTS HERE IF YOU HAVE NOT WAITED LONG    ;;;
;;; ENOUGH FOR YOUR TABLE TO GROW.                             ;;;
;;;------------------------------------------------------------;;;
;;; This script tracks nicknames from chat and stores their    ;;;
;;; corresponding IP address with the nickname in a nicktrack  ;;;
;;; hash table.  The script then echo's (for you only) what the;;;
;;; nickname is for the unvoiced/un-nicked joining chat.       ;;;
;;; It does this for any chat you are presently in.  For this  ;;;
;;; script to work the unvoiced/un-nicked chatter must at some ;;;
;;; time login to chat with a nickname and then the script     ;;;
;;; stores their ip address and nickname in the hash table.    ;;;
;;; The reason to use a hash table is because you could have   ;;;
;;; hundreds of thousands of entries in the nicktrack hash     ;;;
;;; table and the hash table is the fastest way to compute     ;;;
;;; data.  I used a text file once and it was a resource hog   ;;;
;;; and really slowed down EVERYTHING in mIRC.                 ;;;
;;; Any questions look me (Truk) up on www.hawkee.com          ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;                    SCRIPT INSTALLATION                     ;;;
;;;------------------------------------------------------------;;;
;;; To install this script create a new Remote script by       ;;;
;;; selecting Tools/Script Editor... or by pressing Alt+R.     ;;;
;;; Then select File and then select New.  Paste everything    ;;;
;;; here into the new Remote.  Then save it and give it a smart;;;
;;; name similar to Nick_Tracker.mrc or whatever you want - I  ;;;
;;; don't really care :)                                       ;;;
;;; NOW THIS IS IMPORTANT - FOR THIS SCRIPT TO WORK YOU WILL   ;;;
;;; NEED TO CLOSE AND RESTART mIRC.  If you do not do this then;;;
;;; the nicktrack hash table will not be created and it will   ;;;
;;; never work until you restart.                              ;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

on *:LOAD: { 
  ; This creates the hash table on script load, and if it previously saved loads it
  hmake nicktrackjolly 999 
  .timertrack 1 300 LurkerAlert-AutoSave
  if ($isfile(nicktrackjolly.htb)) hload nicktrackjolly nicktrackjolly.htb
}
on *:CONNECT: { 
  if ($network == Ustream) {
    ; This creates the hash table on connect, and if it previously saved loads it
    hmake nicktrackjolly 999 
    .timertrack 1 300 LurkerAlert-AutoSave
    if ($isfile(nicktrackjolly.htb)) hload nicktrackjolly nicktrackjolly.htb
  }
}
on *:DISCONNECT: { 
  if ($network == Ustream) {
    ; Saves the hash table on disconnect.
    hsave -a nicktrackjolly nicktrackjolly.htb
    hfree -sw nicktrackjolly
  }
}

on *:EXIT: { 
  if ($network == Ustream) {
    ; Saves the hash table on Exit
    hsave nicktrackjolly nicktrackjolly.htb
    hfree -sw nicktrackjolly
  }
}

alias LurkerAlert-AutoSave {
  ; Auto Save Loop - Auto Saves the hash table every 5 minutes, this is for in case of a mIRC Crash or if you forget to disconnect, at least you don't loose so much of your data you have collected
  hsave -a nicktrackjolly nicktrackjolly.htb
  .timertrack 1 300 LurkerAlert-AutoSave
}

;  Adds ip addresses and their corresponding nicknames to hash table and announces the ustreamers real stored nick previously stored in the hash table if there is a nick in the hash table

on *:JOIN:#: { 
  if ($network == Ustream) {
    var %ip $gettok($wildsite,1-,46) 
    if (ustreamer !isin $nick) && ($hget(nicktrackjolly,%ip) == $null) {
      ;   Adds the ip address and nickname of the chatter that joins your chat by nicking up
      /hadd nicktrackjolly %ip $nick $+ ,
    }
    elseif ($nick !isin $hget(nicktrackjolly,%ip)) && (ustreamer !isin $nick) { 
      set %alias-temp $hget(nicktrackjolly,%ip) $+ $nick $+ ,
      /hadd nicktrackjolly %ip %alias-temp
    }
    else { halt }
  }
}
; Lozo's help - If you right click on a non-logged in chatter (ustreamer) in your chat and if there is an entry for the chatter in your hash table it will display (for only you to see) the stored nickname 
menu * {
  Lurker Lookup:Lookup $1
}
alias LookUp {
  if ($network == Ustream) {
    if ($1 == $null) { halt }
    var %ip $address($1,2)
    if (ustreamer !isin $1) && ($hget(nicktrackjolly,%ip) != $null) {
      echo -t $chan 11Known aliases for $1 are $hget(nicktrackjolly,%ip)
      halt
    }

    else {
      echo -t $chan 4Sorry, $1 not found in Alias Database
    }
  }
}

Comments

Sign in to comment.
dma   -  Dec 21, 2015

no triggers?
dma

dma  -  Dec 21, 2015

hi

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.