SHARE
TWEET

Untitled

a guest May 19th, 2017 40 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; ############################################
  2. ; ## Address/Nick Tracking                  ##
  3. ; ## Written by Urza - Edited by CheyneyC   ##
  4. ; ############################################
  5.  
  6. menu channel,menubar,nicklist {
  7.   Address Tracking
  8.   .$iif($group(#Addtrack) == on,$style(1)) Show used nicks on join: {
  9.     var %status = $iif($group(#Addtrack) == on,Disable,Enable)
  10.     $+(.,%status) #Addtrack
  11.     echo 7 -at * Users previous nicks will $iif(%status == Disable,no longer,now) be shown when they join
  12.   }
  13.   .-
  14.   .$iif($1,Check nicks for $1):CheckNicks $1
  15.   .Check nicks for an address: {
  16.     CheckNicks $+(*!,$$?="Enter the hostmask you want to check in the format NICK!IDENT@HOST*")
  17.   }
  18. }
  19.  
  20. on *:start: {
  21.   hmake Addtrack 100
  22.   if ($isfile(Addtrack.hsh)) hload Addtrack Addtrack.hsh
  23. }
  24. on *:exit: if ($hget(Addtrack)) hsave -o Addtrack Addtrack.hsh
  25.  
  26. #Addtrack on
  27. on *:join:#: {
  28.   if ($wildsite iswm $address($me,5)) return
  29.   var %mask = $mask($fulladdress,3)
  30.   if ($hget(Addtrack,%mask)) {
  31.     var %usednicks = $ifmatch
  32.     if (%usednicks != $nick) && ($group(#Addtrack) == on) echo 10 -t $chan [Nick Tracking] $nick has also used the nicks: $remtok(%usednicks,$nick,1,44)
  33.     if (!$istok(%usednicks,$nick,44)) hadd -m Addtrack %mask $addtok(%usednicks,$nick,44)
  34.     if ($numtok(%usednicks,44) > 10) hadd -m Addtrack %mask $deltok(%usednicks,1,44)
  35.   }
  36.   else {
  37.     hadd -m Addtrack %mask $nick
  38.   }
  39. }
  40. on *:nick: {
  41.   if ($wildsite iswm $address($me,5)) return
  42.   var %mask = $mask($fulladdress,3)
  43.   if ($hget(Addtrack,%mask)) {
  44.     var %usednicks = $ifmatch
  45.     if (!$istok(%usednicks,$newnick,44)) hadd -m Addtrack %mask $addtok(%usednicks,$newnick,44)
  46.     if ($numtok(%usednicks,44) > 10) hadd -m Addtrack %mask $deltok(%usednicks,1,44)
  47.   }
  48.   else {
  49.     hadd -m Addtrack %mask $newnick
  50.   }
  51. }
  52. #addtrack end
  53.  
  54. alias CheckNicks {
  55.   if (*!*@* iswm $1) {
  56.     var %mask = $mask($1,3)
  57.     if (!$hget(Addtrack,%mask)) echo 4 -ta No entry found for $1
  58.     else echo 10 -ta Address $1 has used the nicks: $hget(Addtrack,$1)
  59.   }
  60.   elseif (!$hget(Addtrack,$address($1,3))) echo 4 -ta No Entry found for $1
  61.   elseif ($hget(Addtrack,$address($1,3)) != $1) {
  62.     var %usednicks = $ifmatch
  63.     echo 10 -ta $1 has also used the nicks $remtok(%usednicks,$1,1,43)
  64.   }
  65.   else echo 10 -ta $1 has not been seen on any other nicks
  66. }
RAW Paste Data
Pastebin PRO Summer Special!
Get 40% OFF on Pastebin PRO accounts!
Top