Page 1 of 1
Connecting as spectator after game start
Posted: 07 Jan 2017, 08:27
by MasterBel2
I've finally got my lobby client (SpringPort) to be able to join a multiplayer game successfully, however, that is providing that I'm there from the start. If I first try to connect to a game that started without me, I'm not added as a spectator but refused connection. ("user is not authorised to connect" as seen from in-game)
The start script I'm using is as follows
Code: Select all
[GAME]
{
HostIP=xxx.xxx.xxx.xxx;
HostPort=xxx;
SourcePort=0;
MyPlayerName=somename;
MyPasswd=secretpassword;
IsHost=0;
}
as taken from
https://github.com/spring/spring/blob/1 ... Format.txt.
I can connect to a game hosted by SL on another computer on the same network, but my username appears as ~Username. But that also happened when I tried to connect to it with SL. Explanations?
Re: Connecting as spectator after game start
Posted: 08 Jan 2017, 13:20
by MasterBel2
Update: I don't seem to be able to reconnect after I've quit the game, even if I was originally a spectator. Still no ideas.
Re: Connecting as spectator after game start
Posted: 12 Jan 2017, 11:58
by abma
~ is prefixed for users who didn't supply a correct password.
the "server" and the clients password must match, so maybe the password are either not set or just missmatch.
https://github.com/spring/spring/blob/d ... .cpp#L2630
Re: Connecting as spectator after game start
Posted: 13 Jan 2017, 02:57
by MasterBel2
abma wrote:the "server" and the clients password must match, so maybe the password are either not set or just missmatch.
I think I'm sending the wrong password. But I've tried sending the player's password both raw and encoded, and neither work. What password am I supposed to send?
Re: Connecting as spectator after game start
Posted: 13 Jan 2017, 14:36
by abma
one of the username + password which is specified in the server script.txt.
Re: Connecting as spectator after game start
Posted: 14 Jan 2017, 00:21
by MasterBel2
Ok, I've made sure that the username + password specified match, and so now I can join as another player. And I can reconnect to a game I left. But I still can't spectate a game that started without me. I get the error "User name not authorised to connect". Yet I know I'm definitely using the password I sent in with the JOINBATTLE command.
Re: Connecting as spectator after game start
Posted: 14 Jan 2017, 02:44
by abma
afaik you have to add new players via the autohost udp socket (idk whats the proper name), thats AutohostIP and AutohostPort in the config.
Re: Connecting as spectator after game start
Posted: 16 Jan 2017, 02:38
by MasterBel2
I have no idea what I changed (git tells me I didn't change anything) but suddenly it's working. Thanks for the help!
EDIT: Not working anymore. I don't know why. Again, nothing changed. :/
I've investigated the UDP path, but after studying the protocol and how SL connects to a host not using NAT transversal, it doesn't use a UDP connection - it's only Spring itself that initiates that.
Re: [SOLVED] Connecting as spectator after game start
Posted: 16 Jan 2017, 18:31
by FLOZi
How is the game you are trying to join being hosted?
Re: Connecting as spectator after game start
Posted: 16 Jan 2017, 22:14
by MasterBel2
I'm trying to connect to a SPADS autohost at the moment, which, according to my lobby, does not use a NAT transversal technique.