Ulysses

General => Developers Corner => Topic started by: frustratedgamers on December 06, 2013, 02:51:41 PM

Title: ULX command to connect to teamspeak
Post by: frustratedgamers on December 06, 2013, 02:51:41 PM
Not sure if this is possible to do since obviously it has to open the program on your computer but if it is possible I think having a command to connect to a servers teamspeak would be pretty cool.
Title: Re: ULX command to connect to teamspeak
Post by: JamminR on December 06, 2013, 03:03:50 PM
You're correct in your guessing, not possible without a heck-of-a-lot of third party stuffs.
Overall, it COULD be designed by someone wanting to write some third party dlls/libraries, BUT, no developer in thier right mind should ever do this.
All it would take is another malicious person to reverse engineer how it's done, release another dll as thier own, then the whole GMod Lua world becomes virus/worm ridden because it just got access to executables on everyone's computers.

The only limited way I could see it working now was if the Gmod HTML engine allowed non-standard links (like, steam://blah/appid URLs start some multiplayer games from websites).
1, I don't know if the Source/Gmod HTML engine allows for non-standard URLs, and 2) I've no idea if TeamSpeak has such a url protocol for web pages that would start it.
Title: Re: ULX command to connect to teamspeak
Post by: Bite That Apple on December 06, 2013, 03:05:09 PM
Not sure if this is possible to do since obviously it has to open the program on your computer but if it is possible I think having a command to connect to a servers teamspeak would be pretty cool.

A very small yes and a huge no. You could 'technically' find the dll that runs teamspeak, redo the entire thing so it works for gmod and have it connect to the servers teamspeak ip.

So basically no, that is not possible, AS FAR AS I KNOW.
Title: Re: ULX command to connect to teamspeak
Post by: Bite That Apple on December 06, 2013, 03:06:55 PM
I've no idea if TeamSpeak has such a url protocol for web pages that would start it.

They do, it's called "ts3server://"
Title: Re: ULX command to connect to teamspeak
Post by: Megiddo on December 06, 2013, 03:08:25 PM
The only limited way I could see it working now was if the Gmod HTML engine allowed non-standard links (like, steam://blah/appid URLs start some multiplayer games from websites).
1, I don't know if the Source/Gmod HTML engine allows for non-standard URLs, and 2) I've no idea if TeamSpeak has such a url protocol for web pages that would start it.

What JamminR said. This is the only way I could see it working without a module installed on the client. Teamspeak does have a weblink connect ability (https://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/46/0/how-can-i-link-to-my-teamspeak-3-server-on-my-webpage)

Chaos beat me to it...
Title: Re: ULX command to connect to teamspeak
Post by: JamminR on December 06, 2013, 03:11:01 PM
They do, it's called "ts3server://"
Someone put a anchor like that in their motd html and see if it starts from Gmod then.
if it does, not full auto-start, but a html popup could be made to click on from ulx.
Title: Re: ULX command to connect to teamspeak
Post by: frustratedgamers on December 06, 2013, 03:14:44 PM
I will try that hyperlink way, never even thought of doing that :p

Edit:
errr actually thinking about it, wouldn't it try to open that link within the game then? (which would not work obv)
Title: Re: ULX command to connect to teamspeak
Post by: JamminR on December 06, 2013, 03:23:53 PM
errr actually thinking about it, wouldn't it try to open that link within the game then? (which would not work obv)
That's why I stated not sure if the Source HTML engine allows for non-standard html protocols. It may only allow https and http links.
If it's not sandboxed, I figure you'd get a message like "link blah is trying to open an external program, do you trust this?", but that it would work.

Title: Re: ULX command to connect to teamspeak
Post by: Bite That Apple on December 06, 2013, 03:28:21 PM
I will try that hyperlink way, never even thought of doing that :p

Edit:
errr actually thinking about it, wouldn't it try to open that link within the game then? (which would not work obv)

That's why I stated not sure if the Source HTML engine allows for non-standard html protocols. It may only allow https and http links.
If it's not sandboxed, I figure you'd get a message like "link blah is trying to open an external program, do you trust this?", but that it would work.

Nope didn't work, and chuck testa.
Title: Re: ULX command to connect to teamspeak
Post by: Cobalt on December 07, 2013, 10:37:25 AM
I may be wrong, but isn't there something like os.execute that you can use to launch executables? Or does that not work in gmod?
os.execute(c:\\program files\\wherever teamspeak is)
Title: Re: ULX command to connect to teamspeak
Post by: Megiddo on December 07, 2013, 11:54:58 AM
Garry removed the os library (and for good reason).