Hi,
I have this script figured out now. There are more things that I'd like to add, like a check to make sure the variable won't be too long, and to delete old nicks as necessary, but I'll post the end result so far. This is just the basic part to get it to write the nicks and addresses in the format I want. Thanks for your help.
[code]
on 1:JOIN:#: {
set %addlength. [ $+ [ $nick ] ] $len($wildsite)
set -u5 %owner.chan $chan
set %defaultqmsg my quit message
set %join.address. [ $+ [ $nick ] ] $wildsite
set %join.precompadress. [ $+ [ $nick ] ] $read(C:\mirc\nicks.txt,w,$wildsite $+ *)
set %oldaddress $readn
set %join.compaddress. [ $+ [ $nick ] ] $left(%join.precompadress. [ $+ [ $nick ] ],%addlength. [ $+ [ $nick ] ])
set %join.compnick. [ $+ [ $nick ] ] $read(C:\mirc\nicks.txt,w,$nick $+ *)
set %oldnick $readn
set %join.time. [ $+ [ $nick ] ] $mid($ctime,2,8)
set %join.newnick $chr(44) $+ $nick %join.time
set %join.bothnew $wildsite $+ $chr(44) $+ $nick %join.time. [ $+ [ $nick ] ]
if (whatever1* iswm $nick) {
if (%join.address. [ $+ [ $nick ] ] == %join.compaddress. [ $+ [ $nick ] ]) { .notice $me Address Match 4 $nick }
else { echo 4 -a No Match $nick }
}
elseif (whatever2* iswm $nick) {
if (%join.address. [ $+ [ $nick ] ] == %join.compaddress. [ $+ [ $nick ] ]) { .notice $me Address Match 4 $nick }
else { echo 4 -a No Match $nick }
}
elseif (%join.address. [ $+ [ $nick ] ] == %join.compaddress. [ $+ [ $nick ] ]) { .notice $me Address Match 4 $nick | goto NickEval }
else { write C:\mirc\nicks.txt %join.bothnew | echo 4 -a $nick is a new entry }
halt
:NickEval
if ($nick = %join.compnick. [ $+ [ $nick ] ]) { .notice $me Nick Match 4 $nick | write -al %oldnick C:\mirc\nicks.txt %join.newnick }
else { write -al %oldaddress C:\mirc\nicks.txt %join.newnick }
}
on 1:NICK: {
set %addlength. [ $+ [ $newnick ] ] $len($wildsite)
set %nick.address. [ $+ [ $newnick ] ] $wildsite
set %nick.precompaddress. [ $+ [ $newnick ] ] $read(C:\mirc\nicks.txt,w,$wildsite $+ *)
set %oldaddress $readn
set %nick.compaddress. [ $+ [ $newnick ] ] $left(%nick.precompaddress. [ $+ [ $newnick ] ],%addlength. [ $+ [ $newnick ] ])
set %nick.compnewnick $read(C:\mirc\nicks.txt,w,$newnick $+ *)
set %oldnick $readn
set %nick.newnick $newnick %join.time. [ $+ [ $nick ] ]
set %nick.nicktime $mid($ctime,2,8)
set %nick.bothnew $wildsite $+ $chr(44) $+ $newnick %nick.nicktime
if ($newnick == %nick.compnewnick) { .notice $me $newnick found }
elseif (%nick.address. [ $+ [ $newnick ] ] == %nick.compaddress. [ $+ [ $newnick ] ]) { write -al %oldaddress C:\mirc\nicks.txt , $+ $newnick %nick.nicktime | .notice $me new nick old address }
else { write C:\mirc\nicks.txt %nick.bothnew | echo 4 -a $newnick is a new entry }
}
on 1:QUIT: {
unset *. $+ $nick
}