Associating Protocols

Nanor

Well-Known Member
I'm curious as to how I would associate protocols with Firefox. For example, those of you who check the main page and click the link to IRC will see it opens IRC and connects automatically. I'd like to be able to do it with BF2, but the protocol BF2 isn't associated with any protocol.

For example, if I would like to connect to say the TGK Clan Francais Server, I would follow the link:

bf2://84.207.19.83:15747/

but the prefix bf2 isn't associated with a protocol.

Any ideas? (Rep for help!)
 

Ronin Storm

Administrator
Staff member
See, you'd be inventing protocols on the fly and that's not going to happen.

HTTP is a protocol. TCP and IP are protocols. FTP is a protocol. Even IRC is a protocol. However, BF2 is an application that runs over TCP/IP and doesn't have an associated protocol.

Instead, I think the question you're looking for revolves around associating the BF2 application with some sort of download. Much of Firefox's associations appear to be done via extensions (e.g. .txt is a Text document). guess, in reality, they're done via MIME headers, but it wouldn't surprise me to find that you can override all that by associating an extension with whatever application you choose (e.g. .txt to Notepad, or Textpad, or MS Word).

So, maybe you could have a file called "server.bf2" that was really a tiny XML file or something that you associate with a launcher application on your system (yet to be created) that then launches your BF2 application with the appropriate command line to go straight into the server you specify. Rather like .pls files for connecting to Internet Radio, I guess.

Still, given that none of these parts exist (outside of applications like Xfire and Comrade) I think this may not be as easy as you were hoping...
 

BiG D

Administrator
Staff member
ut2004 actually registers one when you install it, but that doesn't work with mods, hence that guide. :) There are a few other games that do that too, but I can't think of any offhand.

Anyway, they technically aren't protocols, but you probably know that :p
 
Top