Adium

Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#13899 closed defect (fixed)

IRC links should respect and set port number

Reported by: sphynx Owned by: zacw
Milestone: Adium 1.4.1 Component: Service/IRC
Version: 1.4b17 Severity: normal
Keywords: irc link links # Cc:
Patch Status: Accepted

Description

Summary

When parsing links like "#channel" in an IRC conversation in Adium, the port of the server doesn't get set. So, if the user that clicks on the channel would have added the server on two IRC accounts with different port numbers, a random one will join #channel.

This sounds like a very rare occasion, but when using an IRC proxy this is rather common.

Steps to reproduce

  1. Add two accounts with the same host name (for example, irc.freenode.net:6667 and irc.freenode.net:7000).
  2. Join a channel on the second account you added (:7000).
  3. Click a link to another channel in that channel.

Expected results

Adium should join the channel on the account with which you clicked the link.

Actual results

Adium will join the channel on the first account that was added with that host name.

Notes

I've added a patch that will fix this, mostly. When encountering a "#channel" reference in a channel, the port number will be appended (e.g. "#channel" => "irc://some.server.example:6667/#channel"). When following an irc:// link, the port number will be parsed and compared to the port numbers of the used IRC accounts.

This does not work in the following situations:

  1. When the user has two accounts with exactly the same server and port, it will still join a random one of these two.
  2. When clicking an external link (for example, from Safari) without a port number, it will join a random one that matches the server name.

But I think both situations are very tricky to handle (maybe a window should show asking the user what account he wants to use).

Attachments (1)

IRCLinks.diff (3.4 KB) - added by sphynx 10 years ago.
Patch I made that should fix this.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by sphynx

Patch I made that should fix this.

comment:1 Changed 10 years ago by Robby

  • Milestone set to Adium 1.4.1
  • Patch Status changed from Initially Included to Needs Dev Review

comment:2 Changed 9 years ago by Evan Schoenberg

  • Resolution set to fixed
  • Status changed from new to closed

(In 34dcc4aa92af) Patch from sphynx which fixes handling IRC links which specify a port number and also makes use of this for handling linkified #channel items in chats. Fixes #13899

comment:3 Changed 9 years ago by Robby

  • Patch Status changed from Needs Dev Review to Accepted
Note: See TracTickets for help on using tickets.