mIRC Home    About    Download    Register    News    Help

Print Thread
Get IP/port of server as you connect? #93865 12/08/04 09:02 PM
Joined: Aug 2004
Posts: 1
S
Sequence Offline OP
Mostly harmless
OP Offline
Mostly harmless
S
Joined: Aug 2004
Posts: 1
I'm trying to get the IP/port of the server I'm connecting to BEFORE it tries to ident me, but I can't figure out for the life of me what on/raw event the NOTICE AUTH:*** handshake falls under.

eg,

Code:
* Connecting to / Connect retry #N SERVER (PORT) 
[color:red]<--- RUN ON/RAW EVENT SCRIPT HERE --->[/color]
NOTICE AUTH :*** Looking up your hostname... 


Can someone give me some pointers? Cheers!

Re: Get IP/port of server as you connect? #93866 12/08/04 09:06 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline
Vogon poet
Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
doesnt //dns $server and //echo $port do ?

mirc does load this info before connects to it

coz you see

Connecting to irc.server.org (6667)

and for notice auth there is no raw:

(23:14) <- :arena.webchat.org NOTICE AUTH :Looking up the hostname for 193.xxx.xxx.xxx

Last edited by ShinZon; 12/08/04 09:13 PM.
Re: Get IP/port of server as you connect? #93867 12/08/04 09:55 PM
Joined: Mar 2004
Posts: 457
D
Danthemandoo Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Mar 2004
Posts: 457
on *:snotice:*:{

that will catch it (along with all the other server notices)

Re: Get IP/port of server as you connect? #93868 12/08/04 10:15 PM
Joined: Dec 2002
Posts: 788
C
Coolkill Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Well, theres "no way" you can get the details FROM an Snotice before the Identd responce is sent back and as a result so is the MOTD junk..

You can however, use as suggested above, $server, $serverip and $port.

For example:

On *:Snotice:*Looking up your hostname*:{
echo -s * Connecting to $server ( $+ $serverip $+ ) on $port
}

Eamonn.

Re: Get IP/port of server as you connect? #93869 12/08/04 10:50 PM
Joined: Mar 2003
Posts: 160
Marantz Offline
Vogon poet
Offline
Vogon poet
Joined: Mar 2003
Posts: 160
on ^*:LOGON:*:{
on *:LOGON:*:{
is what you need, add $server and $port in