Skip to content

OnPlayerConnect behaviour after gmx #884

Closed

Description

@NexiusTailer

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)

Activity

  1. added
    bug
    on Mar 5, 2024
  2. AmyrAhmady commented on Mar 5, 2024

    @AmyrAhmady
    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

  3. NexiusTailer commented on Mar 6, 2024

    @NexiusTailer
    ContributorAuthor

    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

  4. Y-Less commented on Mar 6, 2024

    @Y-Less
    Collaborator

    Reverted. Not happening.

  5. NexiusTailer commented on Mar 6, 2024

    @NexiusTailer
    ContributorAuthor

    Reverted. Not happening.

    Why?

  6. pushline commented on Mar 6, 2024

    @pushline

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

  7. NexiusTailer commented on Mar 6, 2024

    @NexiusTailer
    ContributorAuthor

    @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?

  8. reopened this on Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugnightly

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions