Lpfix5, I think I've found a way to adapt the database to the script you've made, but have a couple questions.
When I do /ipadd for a Name that does not already exist in the list, it adds the [Name] section but then adds the IP twice, so it does
[Name]
0=123.123.123.123
1=123.123.123.123
I don't really understand your script fully so I don't know how to fix this.
Also Is it possible to check for duplicates when doing the /ipadd ? If there's a duplicate then it sends a notice to self and does not add the ip.
Yeah there is btw i like people like atleast you profile says newbie but you try

!
here you go mate
alias ipadd {
%ipadd.nick = $1
%ipadd.inicalc = $ini(test.ini,%ipadd.nick,0)
%ipadd.ip = $2
if (%ipadd.ip iswm $readini(test.ini,%ipadd.nick,%ipadd.inicalc)) { echo -a --**IP is already found in list**-- }
if (%ipadd.inicalc = 0) { writeini test.ini %ipadd.nick 1 $2- }
elseif (%ipadd.inicalc > 0) { %ipadd.inicalc = $calc( 1 + $ini(test.ini,%ipadd.nick,0))
writeini test.ini %ipadd.nick %ipadd.inicalc $2-
}
unset %ipadd*
}
O i c you just edited your post, anyhoo it shouldnt duplicate if you have my recent code and not the first one i posted which you may have because i edited my post i forgot something important..
see this is what happens when i
/ipadd JOE 304.24.4.4
/ipadd david 203.233.532.55
/ipadd doug 320.320.244.9
/ipadd andre 034.42.42.42
it returns ini ini file
[JOE]
1=304.24.4.4
[david]
1=203.233.532.55
[doug]
1=320.320.244.9
[andre]
1=034.42.42.42
however if i do those commands again i get a notice because of same ip
but... if i add a new ip to nickname then it becomes second line not duplicate