launching online games from lobbyserver link

Other talk that doesn't fit elsewhere.
This is for General Discussion, not General chat.
flybyray
Rookie
Rookie
Posts: 19
Joined: 01 Oct 2007, 01:42

launching online games from lobbyserver link

Post by flybyray »

I wrote some guide to start warzone games by clicking on links
at http://wz2100.net/lobbyserver in your browser.
This is only for Windows Users! (But it is possible to do likewise in linux gnome with gconf tools).
here is this guide.
http://docs.google.com/View?id=dc6wwdhq_3c3kr93mw

--Update--
This is an additional more generall description http://blogs.msdn.com/b/noahc/archive/2 ... ndler.aspx
perhaps also this helps a bit http://customurl.codeplex.com/
User avatar
JDW
Regular
Regular
Posts: 1669
Joined: 18 May 2010, 20:44

Re: launching online games from lobbyserver link (windows)

Post by JDW »

flybyray wrote:I wrote some guide to start warzone games by clicking on links
at http://wz2100.net/lobbyserver in your browser.
This is only for Windows Users! (But it is possible to do likewise in linux gnome with gconf tools).
here is this guide.
http://docs.google.com/View?id=dc6wwdhq_3c3kr93mw

--Update--
This is an additional more generall description http://blogs.msdn.com/b/noahc/archive/2 ... ndler.aspx
perhaps also this helps a bit http://customurl.codeplex.com/
Shouldn't all guides be a part of the main guide than in the forum? And why is it under ideas and suggestions? :hmm:
"Speak when you are angry and you will make the best speech you will ever regret."
-- Ambrose Bierce
User avatar
Saberuneko
Regular
Regular
Posts: 558
Joined: 15 Jan 2010, 18:20

Associating "warzone" protocol with the game in firefox.

Post by Saberuneko »

Well, I just seen that you could check if there are any avaiable games on the lobby here:

http://wz2100.net/lobbyserver

But when you click, firefox says the protocol "warzone" isn't associated to any app.
I just managed to solve this by myself, so I wanted to share with you.
Sorry if this topic doesn't belong here, but I didn't know where to post it.

First, you have to copy and paste the following code on your browser's direction bar:

Code: Select all

javascript:navigator.registerProtocolHandler('warzone','http://support.mozilla.com/value=%s','warzone');
After that, try clicking the lobby game link again, a window will appear asking you for which app to use for that protocol.

Just click on "choose", then browse to find the warzone.exe on your computer. The next time you click a game there, warzone will auto-start directly! So you don't have to find it and run it. Just auto-open, and then connect to lobby for joining the game! :D

EDIT: Remember to select "Remember my choice"! If not, it only will work once, and you'll have to do all this again!

Hope this is useful for anybody. :3
Safety0ff
Trained
Trained
Posts: 397
Joined: 18 Jul 2009, 23:23

Re: Associating "warzone" protocol with the game in firefox.

Post by Safety0ff »

I always wondered how to do that ( not specifically for warzone though). :ninja:

Thanks for the tip!
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA

Re: Associating "warzone" protocol with the game in firefox.

Post by Zarel »

Hmm. We should see what command-line options get passed to Warzone this way, and interpret them directly.
cybersphinx
Inactive
Inactive
Posts: 1695
Joined: 01 Sep 2006, 19:17

Re: Associating "warzone" protocol with the game in firefox.

Post by cybersphinx »

Merged the two topics about this.
prolix
New user
Posts: 5
Joined: 30 Jun 2010, 01:39

Re: launching online games from lobbyserver link

Post by prolix »

Here is a way to get warzone:// links working in KDE 4.x on Linux, I have tested
this with Konqueror and can now launch warzone directly from clicking a game
link in the lobby web page.
It consists of two files, one is a shell script wrapper to launch warzone2100,
the other is a protocol file for configuring KDE to handle the warzone:// URI
prefix which launches the shell script wrapper.
NOTE: It does require that awk is installed, this no doubt could be changed
using the shell matching or sed or something but I was lazy.
Here are the files.

handle_warzone_protocol.sh

This file should be placed in your $PATH such as ~/bin or
/usr/local/bin and made executable (chmod +x handle_warzone_protocol.sh)

Code: Select all

#!/bin/bash

URL="$1"

if [ -z "$URL" ]; then
    echo Usage: $0 warzone://...
    exit
fi

IP=$(echo "${URL}" | awk --field-separator=/ '{ print $3 }')

exec warzone2100 --join="${IP}"
warzone.protocol

This file should be placed in $(kde4-config --localprefix)/share/kde4/services/
for me that is ~/.kde4/share/kde4/services/ but it may vary by distribution.

Code: Select all

[Protocol]
exec=handle_warzone_protocol.sh '%u'
protocol=warzone
input=none
output=none
helper=true
listing=
reading=false
writing=false
makedir=false
deleting=false
Thanks to cybersphinx for directing me to this thread and for the useful
information others have provided here.
Hiram
Greenhorn
Posts: 8
Joined: 03 Sep 2010, 16:33

Re: Associating "warzone" protocol with the game in firefox.

Post by Hiram »

Saberuneko wrote:Well, I just seen that you could check if there are any avaiable games on the lobby here:

http://wz2100.net/lobbyserver

But when you click, firefox says the protocol "warzone" isn't associated to any app.
I just managed to solve this by myself, so I wanted to share with you.
Sorry if this topic doesn't belong here, but I didn't know where to post it.

First, you have to copy and paste the following code on your browser's direction bar:

Code: Select all

javascript:navigator.registerProtocolHandler('warzone','http://support.mozilla.com/value=%s','warzone');
After that, try clicking the lobby game link again, a window will appear asking you for which app to use for that protocol.

Just click on "choose", then browse to find the warzone.exe on your computer. The next time you click a game there, warzone will auto-start directly! So you don't have to find it and run it. Just auto-open, and then connect to lobby for joining the game! :D

EDIT: Remember to select "Remember my choice"! If not, it only will work once, and you'll have to do all this again!

Hope this is useful for anybody. :3
Keep in mind that you must use an url in the same domain as the site in that tab. So if you got the lobby server open you should use something like

Code: Select all

javascript:navigator.registerProtocolHandler('warzone','http://wz2100.net/lobbyserver?value=%s','warzone');
note that the ?value=%s part is not necessary since we don't want to register a site (thats what its for) but an application.
When you get the choice menu after clicking on a warzone: link, the just register handler is preselected but that is the site and you must still choose the warzone application. If you do this with the lobby then it has the warzone icon but don't let that fool you since it wont work. You still have to choose the application first.
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: launching online games from lobbyserver link

Post by lav_coyote25 »

begin / :lecture:
just a friendly reminder to all. :annoyed:

do not link to any sites unless they are specific warzone 2100 sites. you will get 1 warning. the next instance will be a ban for 1 week. a third instance will be permanent ban. any questions?? NO!! good!! end / :lecture:

do not alter - nor delete this post - thanks - lav_coyote25
You do not have the required permissions to view the files attached to this post.