Here's a breakdown of my script for you smile note all my commands that are written below the values are meant for on top of the note like alias ipadd {
; sflkfsajfsalkfasfas will be meant for alias ipadd {

alias ipadd {
; create a new alias named ipadd to be used with /ipadd
%ipadd.nick = $1
; Creates a variable with the first word said after /ipadd in this case its /ipadd nickname
%ipadd.inicalc = $ini(test.ini,%ipadd.nick,0)
; Calculates the lines that are in the test.ini at section %ipadd.nick which is the variable on top which means again its the nick you type by adding a ,0 after it it caculates the lines total only in that section
%ipadd.ip = $2
; This is the new section you wanted , variable created so it captures ip ex:. /ipadd nickname 127.0.0.1
if (%ipadd.ip iswm $readini(test.ini,%ipadd.nick,%ipadd.inicalc)) { echo -a --**IP is already found in list**-- }
; this means if ip is wildcard match in the test.ini in section [nickname] it echo's in active window --**IP is already found in list**-- <<<fully customizable btw.
if (%ipadd.inicalc = 0) { writeini test.ini %ipadd.nick 1 $2- }
; if the calculation of test.ini has NO nickname registered when you do /ipadd completenewnickname iphere. it then at this times write's the test.ini with nickname and automatically assigns it position 1 in a new section
elseif (%ipadd.inicalc > 0) { %ipadd.inicalc = $calc( 1 + $ini(test.ini,%ipadd.nick,0))
writeini test.ini %ipadd.nick %ipadd.inicalc $2-
}
; else... if my ini calculation has a value 1 2 3 4 .... like
[nick]
1=blah
2=blah
and is set has if larger then 0 << by looking at the other if command on top you will understand where 0 comes from, then perform this command... so it takes the calculation of lines in the section of the ini example 3 and does a simple 1st grade calculation 3 + 1 which 3 would be the lines that already exist, then by having it automatically calculate one it will write the new 4th value...

unset %ipadd*
; unsets all variables that begin with %ipadd
}

enjoy and have fun scripting

um it shouldnt overwrite... the only reason why i assume it overwrites if your mIRC is sending 2 text at same time do to maybe something like a ON input script or... you have 2 identical scripts make sure alias ipadd is only one... just to try a test rename alias ipadd to ipaddtest and try /ipaddtest ............

Last edited by Lpfix5; 28/08/05 04:30 PM.

Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }