Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OnPlayerConnect behaviour after gmx #884

Closed
NexiusTailer opened this issue Mar 5, 2024 · 6 comments · Fixed by #891
Closed

OnPlayerConnect behaviour after gmx #884

NexiusTailer opened this issue Mar 5, 2024 · 6 comments · Fixed by #891
Assignees
Labels
bug Something isn't working nightly

Comments

@NexiusTailer
Copy link
Contributor

Describe the bug
After the recent changes from commit 59c5b09, there are still a bug: if gmx command was used, omp server calls OnPlayerDisconnect (for gamemode only), but does not call OnPlayerConnect at all after the gamemode was fully restarted.

To Reproduce
Log OnPlayerConnect and OnPlayerDisconnect calls

public OnPlayerConnect(playerid)
{
	printf("[GM] OnPlayerConnect(playerid %d)", playerid);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	printf("[GM] OnPlayerDisconnect(playerid %d, reason %d)", playerid, reason);
	return 1;
}

And join a server, then make restart with gmx.
There will be called OnPlayerDisconnect only.

Screenshots and/or logs

[17:05:34] [Info] [connection] incoming connection: 127.0.0.1:57690 id: 0
[17:05:34] [Info] [join] Nexius has joined the server (0:127.0.0.1)
[17:05:34] [Info] [GM] OnPlayerConnect(playerid 0)
[17:05:34] [Info] OnPlayerRequestClass(playerid 0, classid 0)
[17:05:37] [Info] OnPlayerRequestSpawn(playerid 0)
[17:05:37] [Info] OnPlayerSpawn(playerid 0)
[17:05:47] [Warning] RCON (In-Game): Player #0 (Nexius) has logged in.
[17:05:51] [Warning] RCON (In-Game): Player [Nexius] sent command: gmx
[17:05:51] [Info] [GM] OnPlayerDisconnect(playerid 0, reason 1)

[17:06:03] [Warning] Deprecated console variable "rcon", use "rcon.enable" instead.
[17:06:03] [Warning] Legacy key `rcon` supplied, using `rcon.enable`
[17:06:03] [Info] OnPlayerRequestClass(playerid 0, classid 0)
[17:06:09] [Info] OnPlayerRequestSpawn(playerid 0)
[17:06:09] [Info] OnPlayerSpawn(playerid 0)
[17:06:12] [Info] [GM] OnPlayerDisconnect(playerid 0, reason 1)
[17:06:12] [Info] [part] Nexius has left the server (0:1)
@NexiusTailer NexiusTailer added bug Something isn't working nightly labels Mar 5, 2024
@AmyrAhmady
Copy link
Member

Yes, should have fully tested it, my bad
I added the code for it but apparently based on your logs it's not getting executed, I'll check it today

@NexiusTailer
Copy link
Contributor Author

btw this is now probably unneeded

// Never used by us, reserved for some existing libraries.
_PeerDisconnectReason_Custom,
// 4 to match fixes.inc, which wasn't 3 because some other libraries already used it.
PeerDisconnectReason_ModeEnd

@Y-Less
Copy link
Collaborator

Y-Less commented Mar 6, 2024

Reverted. Not happening.

@Y-Less Y-Less closed this as completed Mar 6, 2024
@NexiusTailer
Copy link
Contributor Author

Reverted. Not happening.

Why?

@pushline
Copy link

pushline commented Mar 6, 2024

->community wants thing
->thing is added
->one guy decides (on a community codebase) that isnt happening and try to be the final decision

@NexiusTailer
Copy link
Contributor Author

NexiusTailer commented Mar 6, 2024

@Y-Less so, why not go and make a fork with all needed changes if you personally need it? The community already decided that this is not what should be enabled in the omp server by default. Or does the hypocrisy of covering up one’s projects with the word "community" still continue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nightly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants