mIRC Homepage

/server <- problems with big server port numbers..

Posted By: Adrenalin

/server <- problems with big server port numbers.. - 23/01/04 08:24 PM

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..
Posted By: EVH

Re: /server <- problems with big server port numbers.. - 23/01/04 08:32 PM

76567 ?
The highest is 65535
Posted By: d00dman

Re: /server <- problems with big server port numbe - 23/01/04 09:09 PM

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
Posted By: Adrenalin

Re: /server <- problems with big server port numbe - 23/01/04 11:26 PM

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..
Posted By: stebie

Re: /server <- problems with big server port numbe - 25/01/04 01:08 AM

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
Posted By: Ashkrynt

Re: /server <- problems with big server port numbe - 27/01/04 03:10 AM

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.
© 2021 mIRC Discussion Forums