See Uniform Resource Locator Schemes for Internet Relay Chat Entities, §2.4.
When the server is being specified: if the port is not specified, set it to −1 and accept.
Add a static array of default ports.
When the server is being connected to: if the port is not specified (= −1), connect to the current port. When the connection fails, try the next port.
See Uniform Resource Locator Schemes for Internet Relay Chat Entities, §2.4. When the server is being specified: if the port is not specified, set it to −1 and accept. Add a static array of default ports. When the server is being connected to: if the port is not specified (= −1), connect to the current port. When the connection fails, try the next port.