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

Add text attribute to kick and dispose reason. #963

Closed
ZaneDubya opened this issue Nov 2, 2021 · 1 comment
Closed

Add text attribute to kick and dispose reason. #963

ZaneDubya opened this issue Nov 2, 2021 · 1 comment

Comments

@ZaneDubya
Copy link
Owner

the parameter reason should be accompanied by a text reason that can be added to the logs.

    public void KickAndDispose(int reason, string logError = null) {
        EventSink.InvokeLogMsg(new LogMsgInfo($"{this} kicked, reason: {reason}."));
        if (logError != null) {
            EventSink.InvokeLogMsg(new LogMsgError(logError));
        }
        if (IsDisposing) {
            return;
        }
        Send(new SmsgKick(reason));
        Dispose();
    }
@ZaneDubya
Copy link
Owner Author

Done : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant