mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2003
Posts: 414
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
Ex. /server 172.16.0.5 76567
Quote:
[22:15:30] * Connecting to 172.16.0.5 (11031)

Show wrong port and connect to a wrong port..

Also if you add this server(172.16.0.5 port 76567) in the IRC Server list and connect..
Quote:
[21:50:08] * Connecting to 172.16.0.5 (44671)

Show wrong port but connect to the correct port..


mIRC Chm Help 6.16.0.3 Full Anchored!
Joined: Oct 2003
Posts: 273
E
EVH Offline
Fjord artisan
Offline
Fjord artisan
E
Joined: Oct 2003
Posts: 273
76567 ?
The highest is 65535

Joined: Dec 2002
Posts: 86
D
Babel fish
Offline
Babel fish
D
Joined: Dec 2002
Posts: 86
The ports range from 0-65535, so mIRC wraps the number around that (eg: 76567 - 65536 = 11031, the port you really wanted). This is proper behavior.

-chris

Joined: Apr 2003
Posts: 414
Fjord artisan
OP Offline
Fjord artisan
Joined: Apr 2003
Posts: 414
Yaah.. Don't realize that is soo big.. And thanks for explanation.. That explain all wink

And also a mistake in the my 1 post.. I add in the server list a server with port 765567 not 76567.. For that mIRC show [21:50:08] * Connecting to 172.16.0.5 (44671).

//echo zz $calc((65536 * 11) - 765567) <- -44671

/server server 727563 same /server server 6667 That can be confusing for some ppl(like me some hours ago) wink
The Unix aplication use same think..
Fri Jan 23 21:44:30 :Listener created :0.0.0.0 port 765567 and i connected succefuly with mIRC..
That must be described in some RFC ?
Ok.. Learned somethink new..


mIRC Chm Help 6.16.0.3 Full Anchored!
Joined: Jan 2004
Posts: 2
S
Bowl of petunias
Offline
Bowl of petunias
S
Joined: Jan 2004
Posts: 2
FYI, an easier way to calculate with any large port number would be:

$calc(%port % 65535)

e.g. $calc(765567 % 65535)
That should return: 44671

Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
Quote:
FYI, an easier way to calculate with any large port number would be:

$calc(%port % 65535)

e.g. $calc(765567 % 65535)
That should return: 44671


Actually, it returns 44682 smile

You need to use 65536, not 65535.


Link Copied to Clipboard