mIRC Home    About    Download    Register    News    Help

Print Thread
#7806 22/01/03 12:37 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
it's really anyoing... I doing a mIRC theme...

and with on *:DNS: when it fails to resolve, mIRC returns an error including the dns/ip/nick you wanted to resolve...

now, there is no way to use that value yourself. I would like to see on *:DNS: return the error as $1- in a next mIRC version... it would save some scripting work and I would think it's logical to do so


If it ain't broken, don't fix it!
#7807 22/01/03 12:45 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Right here mate.

It's not what you are after because it's a script but it does hide the original theme.

to hide the INPUT just make this alias:

dns .dns $1

#7808 22/01/03 01:45 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
like I said in the precious post, I know the work around :-] and it's working... but it's crap to have to write an alias, save a var and then read it with on dns... cause mIRC saves the info too so why do stuff twice if you don't have too

since mIRC saves it why not make it accessible to the on DNS event?


If it ain't broken, don't fix it!
#7809 22/01/03 02:13 PM
Joined: Dec 2002
Posts: 2,985
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I see what you mean now - what do you intend to do with $1 if it doesn't resolve? The reason I ask is that $address returns whatever you type in ($1). I just haven't included that in the script I submitted because it is an old one I wrote before I knew as much as I know now.

Note: If you do the DNS lookup on a nickname $address returns the host the nick is connected with and $null if the nickname is not on IRC.

#7810 22/01/03 02:22 PM
Joined: Jan 2003
Posts: 1,063
D
Doqnach Offline OP
Hoopy frood
OP Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
well, what I mean is:

when the dns resolved $dns is filled with all info needed, $1- might be $true
when it failes $dns == $null and $1- is the dns you wanted to resolve ( /dns (nick/ip/address) ) so you don't have to create an alias /dns { dns $1- | set %dns $1- } which you can read when dns failes: if (!$dns(0)) { echo -a can't resolve: %dns }

get it ?

you could just do: if (!$dns(0)) { echo -a can't resolve: $1- }


If it ain't broken, don't fix it!

Link Copied to Clipboard