Nick tracking Script help

By tronwolverine on Dec 17, 2017

**updated***

OK so thanks to one user I was able to fix the part that was already in the program, now I have a new issue, it doesn't track in channel nick name changes, what do I need to add to do that?

ON :START: {
hmake trackusers 10
if ($isfile(trackusers.dat)) {
hload trackusers trackusers.dat
}
}
on
:JOIN:#: {
if ($hget(trackusers,$address($nick,2))) {
var %n = $ifmatch
if ($istok(%n,$nick,32)) { var %d = $deltok(%n,$findtok(%n,$nick,1,32),32) }
else { var %d = %n }
if (!%d) { return }
echo $colour(info) -ti2 $chan $nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
if (!$istok(%n,$nick,32)) {
hadd trackusers $address($nick,2) %n $nick
}
}
else {
hadd trackusers $address($nick,2) $nick
}
}
on
:NICK: {
if ($hget(trackusers,$address($newnick,2))) {
var %n = $ifmatch
if (!$istok(%n,$newnick,32)) {
hadd trackusers $address($newnick,2) %n $newnick
}
}
else {
hadd trackusers $address($nick,2) $newnick
}
}
menu nicklist {
^-?-^ Track Users
.View Other Nicknames:{
if (!$address($$1,2)) { echo $colour(info) -ti2 # IAL not updated for $$1 $+ , performing userhost lookup | userhost $$1 | return }
if ($hget(trackusers,$address($$1,2))) {
var %n = $ifmatch
if ($istok(%n,$$1,32)) { var %d = $deltok(%n,$findtok(%n,$$1,1,32),32) }
else { var %d = %n }
if (!%d) { goto notknown }
echo -a 4
$nick has entered $chan and been seen before with the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
;this is the original line but changed it with the one above to be larger font with color
; echo $colour(info) -ti2 # $$1 has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
}
else {
:notknown
echo $colour(info) -ti2 #
$$1 has not been known by any other nickname
}
}
.Reset:hdel trackusers $address($$1,2)
}
ON *:EXIT: {
if ($hget(trackusers)) { hsave -o trackusers trackusers.dat }

Again it works wonderful, only issue is now if someone changes their nick name in channel it doesn't follow it at all, what do I need to add?

Comments

Sign in to comment.
ovelayer   -  Jan 04, 2018

change

on :JOIN:#: {
if ($hget(trackusers,$address($nick,2))) {
var %n = $ifmatch
if ($istok(%n,$nick,32)) { var %d = $deltok(%n,$findtok(%n,$nick,1,32),32) }
else { var %d = %n }
if (!%d) { return }
msg # $nick has entered $chan and been seen before with the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
;this is the original line but changed it with the one above to be larger font with color
; echo $colour(info) -ti2 $chan $nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
if (!$istok(%n,$nick,32)) {
hadd trackusers $address($nick,2) %n $nick
}
}
else {
hadd trackusers $address($nick,2) $nick
}
}

to

on :JOIN:#: {
if ($hget(trackusers,$address($nick,2))) {
var %n = $ifmatch
if ($istok(%n,$nick,32)) { var %d = $deltok(%n,$findtok(%n,$nick,1,32),32) }
else { var %d = %n }
if (!%d) { return }
echo -t # $nick has entered $chan and been seen before with the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
;this is the original line but changed it with the one above to be larger font with color
; echo $colour(info) -ti2 $chan $nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
if (!$istok(%n,$nick,32)) {
hadd trackusers $address($nick,2) %n $nick
}
}
else {
hadd trackusers $address($nick,2) $nick
}
}

looking through the code you provided the fix was allready there but was excluded?
;this is the original line but changed it with the one above to be larger font with color
; echo $colour(info) -ti2 $chan $nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
this would have it echo to the correct chan and not your active window...

tronwolverine  -  Jan 04, 2018

yeah I didn't catch it, just recently fixed that, now I have a new issue, it does not track in channel nick changes.......

ovelayer  -  Jan 05, 2018

try changing

on :NICK: {
if ($hget(trackusers,$address($newnick,2))) {
var %n = $ifmatch
if (!$istok(%n,$newnick,32)) {
hadd trackusers $address($newnick,2) %n $newnick
}
}
else {
hadd trackusers $address($nick,2) $newnick
}
}

to

on *:NICK: {
if ($hget(trackusers,$address($newnick,2))) {
var %n = $ifmatch
if (!$istok(%n,$newnick,32)) {
hadd trackusers $address($newnick,2) %n $newnick
}
}
else {
hadd trackusers $address($nick,2) $newnick
}
}
tronwolverine  -  Feb 02, 2018

Ok, am giving it a try today! :)

tronwolverine  -  Feb 02, 2018

No change, people can change nicks in channel but it does not log that change and add it to their list of used names attached to the IP. Any other Idea's?

ovelayer  -  Feb 02, 2018
on *:NICK: {
if ($hget(trackusers,$address($nick,2))) {
var %n = $ifmatch
if (!$istok(%n,$newnick,32)) {
hadd trackusers $address($nick,2) %n $newnick
 }
}
else {
hadd trackusers $address($nick,2) $newnick
 }
}

think i see the error.. this might be the answer. seems to be $newnick was used when $nick should have been the identifyer

tronwolverine  -  Feb 05, 2018

ON :START: {
hmake trackusers 10
if ($isfile(trackusers.dat)) {
hload trackusers trackusers.dat
}
}
on
:JOIN:#: {
if ($hget(trackusers,$address($nick,2))) {
var %n = $ifmatch
if ($istok(%n,$nick,32)) { var %d = $deltok(%n,$findtok(%n,$nick,1,32),32) }
else { var %d = %n }
if (!%d) { return }
;echo -a 4 $nick has entered $chan and been seen before with the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
;this is the original line but changed it with the one above to be larger font with color
echo $colour(info) -ti2 $chan
$nick has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
if (!$istok(%n,$nick,32)) {
hadd trackusers $address($nick,2) %n $nick
}
}
else {
hadd trackusers $address($nick,2) $nick
}
}
on :NICK: {
if ($hget(trackusers,$address($newnick,2))) {
var %n = $ifmatch
if (!$istok(%n,$newnick,32)) {
hadd trackusers $address($nick,2) %n $newnick
}
}
else {
hadd trackusers $address($nick,2) $newnick
}
}
menu nicklist {
^-?-^ Track Users
.View Other Nicknames:{
if (!$address($$1,2)) { echo $colour(info) -ti2 #
IAL not updated for $$1 $+ , performing userhost lookup | userhost $$1 | return }
if ($hget(trackusers,$address($$1,2))) {
var %n = $ifmatch
if ($istok(%n,$$1,32)) { var %d = $deltok(%n,$findtok(%n,$$1,1,32),32) }
else { var %d = %n }
if (!%d) { goto notknown }
echo -a 4 $nick has entered $chan and been seen before with the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
;this is the original line but changed it with the one above to be larger font with color
; echo $colour(info) -ti2 #
$$1 has also used the nickname $+ $iif($numtok(%d,32) > 1,s:,:) %d
}
else {
:notknown
echo $colour(info) -ti2 # $$1 has not been known by any other nickname
}
}
.Reset:hdel trackusers $address($$1,2)
}
ON
:EXIT: {

Ok so I think I edited right, but no changes, still won't track in room nick changes

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.