mIRC Home    About    Download    Register    News    Help

Print Thread
#133501 21/10/05 07:02 PM
Joined: Oct 2004
Posts: 38
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
I think it would pretty nice, if something like unique id would be added for each dns transaction,

I`m developing some script, which uses host forward/reverse dns lookups and it must store hosts only if both records, forward and reverse matches. So, when I get on DNS event I dont know - is it first time, when script resolves reverse dns or is it already has been resolved and now it is check for forward (I`m still thinking how to solve that problem).

I think, those Uniq-id could be something like -[?] switch to dns command, and available in 'on dns' event with $dns().id etc.

Joined: Apr 2004
Posts: 218
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Apr 2004
Posts: 218
That would be nifty. shocked


Live to Dream & Dream for Life
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Er, how would you want this to work?

Mind giving an actual example? like what you would type to do the dns, and what would be returned?

Joined: Oct 2004
Posts: 38
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
Quote:
what you would type to do the dns, and what would be returned?

/dns command never return anything. Read the manual.
btw. open ur eyes, I had explained all what you asked, above. :tongue:

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Rand didn't ask you to be a smartass, he asked you to explain what additional/different parameters /dns should accept and what on DNS would look like, which is a perfectly valid request. And he never said /dns itself would return something (in the sense that identifiers do), that much should have been obvious to you. You are the one who should do some more reading or rather make sense of what you read.

I bet you didn't like my tone, did you? Well, I'm sure Rand didn't like yours either.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Oct 2004
Posts: 38
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Oct 2004
Posts: 38
Ok, if it still not clearly, what I had said, I`ll explaim it in details.

/dns command breaks the logical connection between command, and result of this command, which we get with "ON DNS" event (in difference with some $function() etc.). So, I suggest adding some identifier which would help to identify dns transaction.
Example:

Code:
/dns -ih some_id some.host
->
on 1:dns:{
  echo -a $dns(0).id ( $dns(1).ip - $dns(1).addr )
}


and it to return something like this:
some_id ( 127.0.0.1 - some.host )
Here I has added -i switch (it isnt used in mIRC, I has imagined it myself to show an example)


HOW EXACTLY to associate this id to the transaction - I dont know, because of Im not a programmer.

Sry for my low skills in english.

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Ok, what you want is now perfectly clear and a nice suggestion indeed. An alternative way of identifying which /dns triggered which on DNS could be the filling of $1- with the parameters passed to /dns. For example if I did /dns mirc.com blah 1234 (which is currently accepted by /dns without errors), in the on DNS event the following would happen:
$1 would be filled with "mirc.com"
$2 with "blah"
$3 with "1234"
$1- with "mirc.com blah 1234"


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Feb 2005
Posts: 342
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Thanks qwerty.

Stranger_Lv, I was only asking for an example of how it'd work and what it'd return. Heh. Your first post was a bit vague, however, your third post answers my question.

It'd be pretty useful. Definetly would make "on dns" easier to deal with.


Link Copied to Clipboard