Chief Posted February 24, 2007 Report Share Posted February 24, 2007 (edited) 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: [email protected] [email protected] 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 Edited February 24, 2007 by Chief Link to comment Share on other sites More sharing options...
Guest Travis Posted February 24, 2007 Report Share Posted February 24, 2007 well Im having trouble reading this accurately. Looking at it too long makes me wanna take a nap. BUT!! By looking at it I dont think this will allow you to put a time stamp on the individual nickname join. If each line is the person, and each token of 32 is a nickname, you remove one as you add another if it gets to be more than 10, you cannot put a time stamp per nick this way. Unless you logged the info seperately. I'd say use an ini file for this. [iP] nick1=time joined <channel or other additional info if desired> nick2=time joined nick3=time joined I dont use text files much so I could be totally wrong! Link to comment Share on other sites More sharing options...
Chief Posted February 24, 2007 Author Report Share Posted February 24, 2007 Its previous "gates" at a certain nick im logging, not nicks at a gate, but the principle is the same just switched around, ircd's show (usualy) a masked version of the users ip as there gate, i was looking to use this code to help me see how oftern certain users ip masks change .. to help with effective ip banning or spotting certain isp's and ranges, the while loop in my code lists the ip masks one per line in the window, so its easy to compare them Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now