Closed Bug 278746 Opened 20 years ago Closed 19 years ago

Auto Connect doesn't handle servers, only networks

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: chill, Assigned: rginda)

Details

(Whiteboard: cz-patch)

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

The auto-connect feature wants a URL in the form of IRC://irc.whatever.com and
then seems to connect using the /network command.

This chokes on our internal IRC server with an error "Unknown network
"myserver".  After connecting to my internal server and channel, ChatZilla shows
me the URL of irc://servername/channel but I can't use that for auto-connect.

I need to connect with the /server command.

There should be a way to auto-connect to an internal server without this error.

Reproducible: Always

Steps to Reproduce:
1. Specify a server to connect to in the auto-connect (not a network)
2. Re-start ChatZilla

Actual Results:  
Unknown network "habeus"

Expected Results:  
Network view for “habeus” opened.
Attempting to connect to “habeus”. Use /cancel to abort.
Connecting to irc://habeus/ (irc://habeus/,isserver), attempt 1 of 5...

etc
You can work around the problem by entering the url by hand into the preferences
window.

Edit->Chatzilla Preferences->Global Settings, Startup tab.
Note the url that it uses with the server command, that's what you need to use:
irc://habeus/,isserver
I'm not even sure if this fixes the bug without the need for ,isserver, but I
think it's an improvement in general, since now we no longer need to have
irc:// in front of the stuff we open at startup. Since we still use attach (and
can modify this as necessary), this should not be a problem.

Reporter, I myself do not have access to such a local IRC server, so I'm unable
to test if this patch resolves your issue. Could you please try it and see if
this solves the problem? I will attach an XPI to this bug as well in case you
are not able to create one yourself from this patch.
Attachment #177548 - Flags: review?(rginda)
Attached file XPI with the change added. (obsolete) —
PI with the changes made by the patch.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attachment #177550 - Attachment mime type: text/plain → application/x-xpinstall
Okay, this works for me.

I still need to use ,isserver but now I can directly join a channel upon startup
using: irc://myserver/mychannel,isserver

If I leave out the ,isserver then it complains about not finding network "myserver".

I think the best overall solution might be to change the URL displayed in the
channel header to include ,isserver and add a line in the Global
Settings/Startup/Auto-connect URLs text to say something like "Append ,isserver
if attaching to a server and not a network. (e.g. irc://mozserver,isserver)"

Thanks for making the .XPI, too.  I wouldn't have gotten to it until the weekend
if I had to create my own.
Comment on attachment 177548 [details] [diff] [review]
Patch to use attach instead of gotoIRCURL

I don't think the ability to leave out "irc://" in the autoconnect list is a
feature.

Won't most users be managing this list from the context menu anyway?  And
wouldn't the context menu be confused when it finds things that don't start
with irc: in the auto-connect list (ie. "moznet/chatzilla" !=
"irc://moznet/chatzilla")?
Attachment #177548 - Flags: review?(rginda) → review-
Also, you can simulate a local irc server by putting a line like...

  207.126.111.200 ircmozillaorg

...in your hosts file.  Then you can connect to irc.mozilla.org as if it were
called ircmozillaorg.

According to google, here's where you'll find it on a windows machine:

  Windows 95/98/Me c:\windows\hosts

  Windows NT/2000/XP Pro  c:\winnt\system32\drivers\etc\hosts

  Windows XP Home c:\windows\system32\drivers\etc\hosts 
Context menu?  Oops, I didn't check that.  Using that doesn't add the ,isserver
and thus won't work for an internal irc server.
Attachment #177548 - Attachment is obsolete: true
Attachment #177550 - Attachment is obsolete: true
Attached patch Patch v2 (obsolete) — Splinter Review
New Patch.
Rginda, you were obviously right. Sorry for missing that. This is what
ChatZilla does after this patch:

* When you use gotoIRCURL, ChatZilla checked whether you supplied a network or
a server, and it stopped doing anything when it found you were using a network
name, yet the network did not appear in the network list. Now it will warn you,
but still try to connect to the specified host *as a server*. This should fix
the problem described in comment #0
* When you connect to a network that was previously unknown to ChatZilla, it
will now simply set CIRCNetwork.temporary to true. You can pass the 'temporary'
parameter when adding networks. I presumed (as described by rginda on irc, some
time ago) that using that instead of the bogus check (serverlist.length = 0,
port != 6667, unicodenames identical) it just checks whether this.temporary is
set.

This should fix the issues described, and make ChatZilla just a bit more
lenient when handling IRC urls.
Attachment #179515 - Flags: review?(rginda)
Comment on attachment 179515 [details] [diff] [review]
Patch v2

I'd prefer we didn't try the network as a server when the network wasn't known.
 If you take out that part, r=rginda.
Patch with rginda's comments fixed.
Attachment #179515 - Attachment is obsolete: true
Comment on attachment 179515 [details] [diff] [review]
Patch v2

r=rginda with changes mentioned in previous comment.
Attachment #179515 - Attachment is obsolete: false
Attachment #179515 - Flags: review?(rginda) → review+
Attachment #179515 - Attachment is obsolete: true
Comment on attachment 181195 [details] [diff] [review]
Patch without networks being interpreted as a server as a fallback

Setting r+ as per comment 12.

/me kicks bugzilla for screwing up. (see bug 99215)
Attachment #181195 - Flags: review+
Whiteboard: cz-patch
Attachment #181195 - Flags: approval1.8b2?
Comment on attachment 181195 [details] [diff] [review]
Patch without networks being interpreted as a server as a fallback

a=asa
Attachment #181195 - Flags: approval1.8b2? → approval1.8b2+
Checked in --> FIXED.

Automated builds at http://twpol.dyndns.org/mozilla/chatzilla/nightly/ will
include this shortly.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: