This script will store users, and their addresses; and then addresses, and their users.
For example, the address !@DieOrLiveFree.net may have multiple users on the address if it is a vhost, this script will store all the users in a database.
Or, if a Nick uses multiple Addresses, it will store all of them in a database
This script works great for IRCops or operators who moderate a lot, you can then see different nicks that the user has used besides the one that he is currently using.
Right off the bat when you load the script, it will gather all of the nicks in every channel you are in, even multiple networks. It will continue to store them on certain events: Nick changes, Joins, Parts, Quits, etc.
Enjoy and let me know if their are any problems with the script since i haven't tested it much, i mostly tested that it worked and funtioned properly.
Screens:
#####################################
# #
# Address and Nick Database #
# #
#####################################
;--- Do not edit below this line ---
alias leetdb {
if (!$dialog(1337DB)) { dialog -mn ANDB ANDB }
}
menu Status,Channel {
_-= Address and Nick DataBase =-_
.Open A and N Database { leetdb }
.Search an Address for Nicks used {
var %spec $?="What is the Address you are Searching? ex: *!*@DieOrLiveFree.net (include '*!*')"
var %leet.cnt $numtok($hget(Addresses,%spec),32)
var %leet.tok $hget(Addresses,%spec)
if (%leet.cnt = 0) { echo -a 4No Nicks were found for %spec | halt }
echo -a 4Nicks found for %spec $+ :
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
echo -a 7 $+ $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
.Search a Nick for Addresses Used {
var %spec $?="What is the Nick you are Searching? ex: PePSiMaN"
var %leet.cnt $numtok($hget(Nicks,%spec),32)
var %leet.tok $hget(Nicks,%spec)
if (%leet.cnt = 0) { echo -a 4No Addresses were found for %spec | halt }
echo -a 4Addresses found for %spec $+ :
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
echo -a 7 $+ $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
}
menu Nicklist,Query {
_-= Address and Nick DataBase =-_
.Open A and N Database { leetdb }
.List all Nicks used by $1 $+'s Current Address {
var %leet.cnt $numtok($hget(Addresses,$address($1,2)),32)
var %leet.tok $hget(Addresses,$address($1,2))
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
echo -a $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
.List all Addresses used by $1 $+ 's Current Address {
var %leet.cnt $numtok($hget(Nicks,$1),32)
var %leet.tok $hget(Nicks,$1)
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
echo -a $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
}
dialog ANDB {
title "Nick and Address DataBase - By PePSiMaN"
size -1 -1 306 141
option dbu
combo 1, 4 8 95 121, size
combo 2, 106 8 95 121, size
combo 3, 207 8 95 121, size
button "Address", 4, 155 132 45 8
button "Find", 5, 275 132 30 9
box "Channel List", 6, 2 1 100 130
box "Nick List", 7, 104 1 100 130
box "Leet Database", 8, 205 1 100 130
text "Click a Channel to Start", 9, 2 132 99 8, center
text "", 10, 202 132 71 8, center
}
alias recieve.add.all {
var %net.get 1
while (%net.get <= $scon(0)) {
var %chan.get 1
scon %net.get
while (%chan.get <= $chan(0)) {
var %nick.get 1
while (%nick.get <= $nick($chan(%chan.get),%nick.get)) {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick($chan(%chan.get),%nick.get) !isin $hget(Addresses,$address($nick($chan(%chan.get),%nick.get),2))) && ($hget(Addresses,$address($nick($chan(%chan.get),%nick.get),2))) { hadd Addresses $address($nick($chan(%chan.get),%nick.get),2) $hget(Addresses,$address($nick($chan(%chan.get),%nick.get),2)) $nick($chan(%chan.get),%nick.get) }
if (!$hget(Addresses,$address($nick($chan(%chan.get),%nick.get),2))) { hadd Addresses $address($nick($chan(%chan.get),%nick.get),2) $nick($chan(%chan.get),%nick.get) }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick($chan(%chan.get),%nick.get),2) !isin $hget(Nicks,$nick($chan(%chan.get),%nick.get))) && ($hget(Nicks,$nick($chan(%chan.get),%nick.get))) { hadd Nicks $nick($chan(%chan.get),%nick.get) $hget(Nicks,$nick($chan(%chan.get),%nick.get)) $address($nick($chan(%chan.get),%nick.get),2) }
if (!$hget(Nicks,$nick($chan(%chan.get),%nick.get))) { hadd nicks $nick($chan(%chan.get),%nick.get) $address($nick($chan(%chan.get),%nick.get),2) }
inc %nick.get
}
inc %chan.get
}
inc %net.get
}
}
on *:START: {
if (!$exists(Addresses.db)) { hmake Addresses 9999 | hsave Addresses Addresses.db | echo -a 7Address Database has been made }
if (!$exists(Nicks.db)) { hmake Nicks 9999 | hsave Nicks Nicks.db | echo -a 7Nick Database has been made }
if (!$hget(Addresses)) && ($exists(Addresses.db)) { hmake Addresses 9999 | hload Addresses Addresses.db | echo -a 7Address Database loaded }
if (!$hget(Nicks)) && ($exists(Nicks.db)) { hmake Nicks 9999 | hload Nicks Nicks.db | echo -a 7Nick database loaded }
recieve.add.all
}
on *:CONNECT: {
recieve.add.all
}
on *:JOIN:*: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick !isin $hget(Addresses,$address($nick,2))) && ($hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $hget(Addresses,$address($nick,2)) $nick }
if (!$hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $nick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick,2) !isin $hget(Nicks,$nick)) && ($hget(Nicks,$nick)) { hadd Nicks $nick $hget(Nicks,$nick) $address($nick,2) }
if (!$hget(Nicks,$nick)) { hadd nicks $nick $address($nick,2) }
}
on *:QUIT: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick !isin $hget(Addresses,$address($nick,2))) && ($hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $hget(Addresses,$address($nick,2)) $nick }
if (!$hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $nick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick,2) !isin $hget(Nicks,$nick)) && ($hget(Nicks,$nick)) { hadd Nicks $nick $hget(Nicks,$nick) $address($nick,2) }
if (!$hget(Nicks,$nick)) { hadd nicks $nick $address($nick,2) }
}
on *:TEXT:*:*: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick !isin $hget(Addresses,$address($nick,2))) && ($hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $hget(Addresses,$address($nick,2)) $nick }
if (!$hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $nick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick,2) !isin $hget(Nicks,$nick)) && ($hget(Nicks,$nick)) { hadd Nicks $nick $hget(Nicks,$nick) $address($nick,2) }
if (!$hget(Nicks,$nick)) { hadd nicks $nick $address($nick,2) }
}
on *:ACTION:*:*: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick !isin $hget(Addresses,$address($nick,2))) && ($hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $hget(Addresses,$address($nick,2)) $nick }
if (!$hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $nick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick,2) !isin $hget(Nicks,$nick)) && ($hget(Nicks,$nick)) { hadd Nicks $nick $hget(Nicks,$nick) $address($nick,2) }
if (!$hget(Nicks,$nick)) { hadd nicks $nick $address($nick,2) }
}
on *:KICK:*: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($nick !isin $hget(Addresses,$address($nick,2))) && ($hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $hget(Addresses,$address($nick,2)) $nick }
if (!$hget(Addresses,$address($nick,2))) { hadd Addresses $address($nick,2) $nick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($nick,2) !isin $hget(Nicks,$nick)) && ($hget(Nicks,$nick)) { hadd Nicks $nick $hget(Nicks,$nick) $address($nick,2) }
if (!$hget(Nicks,$nick)) { hadd nicks $nick $address($nick,2) }
}
on *:NICK: {
if (!$hget(Addresses)) { hmake Addresses 9999 | hload Addresses Addresses.db }
if ($newnick !isin $hget(Addresses,$address($newnick,2))) && ($hget(Addresses,$address($newnick,2))) { hadd Addresses $address($newnick,2) $hget(Addresses,$address($newnick,2)) $newnick }
if (!$hget(Addresses,$address($newnick,2))) { hadd Addresses $address($newnick,2) $newnick }
if (!$hget(Nicks)) { hmake Nicks 9999 | hload Nicks Nicks.db }
if ($address($newnick,2) !isin $hget(Nicks,$newnick)) && ($hget(Nicks,$newnick)) { hadd Nicks $newnick $hget(Nicks,$newnick) $address($newnick,2) }
if (!$hget(Nicks,$newnick)) { hadd nicks $newnick $address($newnick,2) }
}
on *:DIALOG:ANDB:init:*: {
var %chan.cnt 1
while (%chan.cnt <= $chan(0)) {
did -a $dname 1 $chan(%chan.cnt)
inc %chan.cnt
}
did -a $dname 10 Type in Leet to Find
}
on *:DIALOG:ANDB:*:*: {
if ($devent == sclick) {
if ($did == 1) {
set %did1 $did(1)
var %nick.cnt 1
did -r $dname 2
while (%nick.cnt <= $nick($did(1),0)) {
if ($did(4) = Address) {
did -a $dname 2 $nick($did(1),%nick.cnt))
}
if ($did(4) = Nick) {
did -a $dname 2 $address($nick($did(1),%nick.cnt),2)
}
inc %nick.cnt
}
}
if ($did == 2) {
set %did2 $did(2)
did -r $dname 3
if (%leet.view == Nick) {
var %leet.cnt $numtok($hget(Nicks,$did(2)),32)
var %leet.tok $hget(Nicks,$did(2))
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
if (%leet.view == Address) {
var %leet.cnt $numtok($hget(Addresses,$did(2)),32)
var %leet.tok $hget(Addresses,$did(2))
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
}
if ($did == 3) { set %did3 $did(3) }
if ($did == 4) {
if ($did(4) = Nick) {
set %leet.view Nick
did -a $dname 4 Address
var %nick.cnt 1
did -r $dname 2
while (%nick.cnt <= $nick($did(1),0)) {
did -a $dname 2 $nick($did(1),%nick.cnt))
inc %nick.cnt
}
}
elseif ($did(4) = Address) {
set %leet.view Address
did -a $dname 4 Nick
var %nick.cnt 1
did -r $dname 2
while (%nick.cnt <= $nick($did(1),0)) {
did -a $dname 2 $address($nick($did(1),%nick.cnt),2)
inc %nick.cnt
}
}
}
if ($did == 5) {
if (!$did(3)) { halt }
else {
set %did3 $did(3)
if ($hget(Addresses,$did(3))) || ($hget(Nicks,$did(3))) {
did -r $dname 3
if ($hget(Nicks,%did3)) {
var %leet.cnt = $numtok($hget(Nicks,%did3),32)
var %leet.tok = $hget(Nicks,%did3)
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
if ($hget(Addresses,%did3)) {
var %leet.cnt = $numtok($hget(Addresses,%did3),32)
var %leet.tok = $hget(Addresses,%did3)
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
}
}
}
}
if ($devent == dclick) {
if ($did == 3) {
set %did3 $did(3)
if ($hget(Addresses,$did(3))) || ($hget(Nicks,$did(3))) {
did -r $dname 3
if ($hget(Nicks,%did3)) {
var %leet.cnt = $numtok($hget(Nicks,%did3),32)
var %leet.tok = $hget(Nicks,%did3)
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
if ($hget(Addresses,%did3)) {
var %leet.cnt = $numtok($hget(Addresses,%did3),32)
var %leet.tok = $hget(Addresses,%did3)
while (%leet.cnt > 0) {
tokenize 32 %leet.tok
did -a $dname 3 $gettok(%leet.tok,%leet.cnt,32)
%leet.tok = $deltok(%leet.tok,%leet.cnt,32)
dec %leet.cnt
}
}
}
}
}
}
I get this error in win 7 mirc 7.19
right clicking on someone to use script does nothing.
Anyone can fix that ???
when I use it ,when clicking some (many) nicks no address show on the next window (leet database)and same when clicking an some address (nick window) no nicks show (leet database) , also there are spaces between address, maybe they are addresses with problems and not shown ?
thanks Pepsi_Man0077
also
You can view nicks by nicks it you get the $numtok error worked out. You search the address by double clicking it, and then you search the nick again. As for the numtok error, i cant get it working right, but its in the correct format which is whats confusing me. But i will try to fix it some more when i get the chance.
Looks really nice, would be cool if you could also view nicks by nicks in the dialog.
I also added an ON EXIT hsave to mine so I can collect data between diffrent sessions. It seems that the dialog only shows information about users currently on the channel perhaps it would be nice to optional see all users/addresses that were on the channel in the past.
If got one problem with the searches, they always fail with "* Invalid format: $numtok" I have to study a bit further what is the reason for this, an idea anyone? (mIRC Version is 6.16, I know its very old...)