use this to get iplookup working again:
on *:sockread:iplookup: {
var %ip | sockread %ip
if ($regex(%ip,/IP Address<\/td><td align='left'><b>(.+)<\/b><\/td><\/tr>/)) { did -ra lus1 3 $regml(1) }
if ($regex(%ip,/City<\/td><td align='left'><b>(.+)<\/b><\/td><\/tr>/)) { did -ra lus1 5 $regml(1) }
if ($regex(%ip,/State or Region<\/td><td align='left'><b>(.+)<\/b><\/td><\/tr>/)) { did -ra lus1 7 $regml(1) }
if ($regex(%ip,/Country<\/td><td align='left'><b>(.+)<\/b><\/td><\/tr>/)) { did -ra lus1 9 $regml(1) }
if ($regex(%ip,/ISP<\/td><td align='left'><b>(.+) <\/b><\/td><\/tr>/)) { did -ra lus1 11 $regml(1) | did -ra lus1 15 $did(lus,2).seltext | .sockclose iplookup }
}
its a bot script thats supposed to "raw"command your bot...
the correct way of doing this would be:
on 500:TEXT::: {
;commands are written to a textfile to recover them later
write command.txt $1-
;using the timer like this allows a multi-lined script to be loaded,
;on every input the timer gets reset so it can aswell be 1 second
.timerexecute 1 3 exectute.raw
}
;just a nice alias name
alias execute.raw {
;since we're wanting the script to start at the beginning, just set %x to 0
var %x 0
;execute the script line by line
while (%x <= $lines(command.txt)) {
$read(command.txt, %x)
inc %x
}
;write -c clears the textfile... (we dont want scripts to run over and over again)
write -c command.txt
}
this construction lets mirc interact with identifyers, for obvious reasons (noob programming) it doesnt allow it the way that is shown above
the actual purpose of this script is, in my case, this situation:
im creating a linked server in mIRC, who is able to check spamfilter hits and match them to a username/host
the "database" im using is looking like this:
[1]
nick=horstefan
address=stefanpc.lan
spamhits=5
chans=#home,#test,#opers
[2]
etc...
the purpose of the script is to search on: "nick=horstefan" and get the userid (1)
this is (as far as i know) not possible with mirc basic commands...
edit@ napa182:
this script is not meant for searching topics by number, its meant for searching topics by data (like address=stefanpc.lan, or nick=horstefan)
edit@Jethro_:
what exactly is your idea of mimicing... readini doesnt provide this option, so you got any suggestions on it?