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

SERVER_STOP event is not fired if SERVER_START is not enabled #110

Closed
oblx opened this issue Jul 17, 2018 · 1 comment
Closed

SERVER_STOP event is not fired if SERVER_START is not enabled #110

oblx opened this issue Jul 17, 2018 · 1 comment
Assignees
Labels
bug Things that don't work the way they should

Comments

@oblx
Copy link
Contributor

oblx commented Jul 17, 2018

I have a web hook on server_stop but not on server_start however it didn't POST to my url when stopping server. I figured out that without server_start enabled then server_stop is also disabled.

This enables both hooks :

    # This event is fired when the server starts
    "server_start"=[
        {
            address="http://localcraft/serverStart"
            dataType=JSON
            details=false
            enabled=true
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]
    # This event is fired when the server stops
    "server_stop"=[
        {
            address="http://localcraft/serverStop"
            dataType=JSON
            details=false
            enabled=true
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]

This enables SERVER_START :

    # This event is fired when the server starts
    "server_start"=[
        {
            address="http://localcraft/serverStart"
            dataType=JSON
            details=false
            enabled=true
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]
    # This event is fired when the server stops
    "server_stop"=[
        {
            address="http://localcraft/serverStop"
            dataType=JSON
            details=false
            enabled=false
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]

Finally, this does nothing :

    # This event is fired when the server starts
    "server_start"=[
        {
            address="http://localcraft/serverStart"
            dataType=JSON
            details=false
            enabled=false
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]
    # This event is fired when the server stops
    "server_stop"=[
        {
            address="http://localcraft/serverStop"
            dataType=JSON
            details=false
            enabled=true
            form=true
            headers=[]
            method=POST
            permissions {
                "*"=true
            }
        }
    ]

With both GET and POST methods.

@oblx
Copy link
Contributor Author

oblx commented Jul 17, 2018

It looks like server_stop is randomly fired with /stop
Sometimes it reaches my endpoint and sometimes I get nothing.

@Valandur Valandur self-assigned this Jul 27, 2018
@Valandur Valandur added the bug Things that don't work the way they should label Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Things that don't work the way they should
Projects
None yet
Development

No branches or pull requests

2 participants