Hello, I hope someone can help me! ![]()
I have this code, which is the good old exoclone nick tracker... kinda reversed round to log pervious ip masks @ a certain nick in and ircd chat ...
It echos then to a window kinda of like this:
#channel ===============
( time ) Name's last 2 ip's are:
etc .. logging upto the previous 10 used by that nick.
What im wanting to get it to do is record the time & date of each new ip mask and echo it next to each one like this ..
#channel ===============
( time ) Name's last 2 ip's are:
[email protected] 12:20:12 20/02/07
[email protected] 02:34:01 24/02/07
etc ...
So i can see when they change, what im stuck on is how to alter the write, read, and deltok to include the new parameter i want to add which is .. time & date. Im sure its something simple, or maybe because i looking at it half 3 in the morning
anyway hope someone can point me in the right direction! ![]()
#ip2check on
on *:start:/window @IP's
on *:JOIN:#:{
if ($left($nick,1) == ') || ($left($nick,1) == >) halt
ipcheck $ial($nick).addr $remove($nick,') $chan
}
raw knock:*:{
if ($left($nick,1) == >) halt
; set -u5 %knock. [ $+ [ $remove($nick,') ] ] $true
ipcheck $address $remove($nick,') $1
}
alias ipcheck {
if ($1 != $me) {
var %n 10
var %x $read($scriptdir $+ check.dat,sn,$2)
if (%x == $null) write $+(",$scriptdir,check.dat") $2 $1
else {
%x = $addtok(%x,$1,32)
if ($numtok(%x,32) > %n) %x = $deltok(%x,1,32)
write -l $+ $readn $+(",$scriptdir,check.dat") $2 %x
}
if ($numtok(%x,32) > 1) {
echo $iif(%IpCheck. [ $+ [ $2 ] ] == $true,-a,@IP's) $3 ========================================================
echo $iif(%IpCheck. [ $+ [ $2 ] ] == $true,-a,@IP's) 4 $+ $timestamp $date $chr(2) $+ $2 $+ $chr(2) Last 4 $chr(2) $+ $numtok(%x,32) $+ $chr(2) IP's Used:
var %c = $numtok(%x,32)
var %z 1
while (%z <= %c) {
echo $iif(%IpCheck. [ $+ [ $2 ] ] == $true,-a,@IP's) $gettok(%x,%z,32)
inc %z
}
}
}
}
#ip2check end