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

SourceComms not registering reconnect/disconnect #309

Closed
Joe-Howanski opened this Issue Jun 1, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@Joe-Howanski
Copy link

Joe-Howanski commented Jun 1, 2017

Expected Behavior

When I mute/gag an individual for the session: sm_mute name -1 or sm_gag name -1, it is supposed to mute/gag them only for the session. Upon their departure and return, the mute/gag should no longer be applied.

Current Behavior

Currently if I mute or gag the person for the session and they leave the server, when they rejoin it is still applied.

Steps to Reproduce (for bugs)

  1. Use sm_mute or sm_gag name -1 on a player.
  2. Have the player reconnect
  3. See if the player can talk/chat

Context

This has prevented the use of session only mutes/gags.

Your Environment

  • Version used: Version 1.6.1
  • SM Version: 1.8.0.5995
  • Operating System and version: Linux Debian
@CrazyHackGUT

This comment has been minimized.

Copy link
Contributor

CrazyHackGUT commented Jun 3, 2017

Session == Before changing the map or reconnecting

This is not bug. Feature from SourceComms.
Give mute for player on -1 minutes, open SourceBans web panel, and look on the "time". You must see text "Expired".

@Joe-Howanski

This comment has been minimized.

Copy link

Joe-Howanski commented Jun 3, 2017

@CrazyHackGUT To my understanding from the thread and configs, the session mute/gag is supposed to be until the player disconnects, however, it is lasting even after they disconnect. Should this be the case?

@CrazyHackGUT

This comment has been minimized.

Copy link
Contributor

CrazyHackGUT commented Jun 4, 2017

Session mute/gag works same as BaseComms.
Delete SourceComms plugin, add mute/gag with BaseComms (you find him in "Player commands"), and reconnect to server.

@Joe-Howanski

This comment has been minimized.

Copy link

Joe-Howanski commented Jun 4, 2017

Yes, in BaseComms, if I mute someone, or gag someone, and they leave the server, and reconnect, they no longer have a mute or gag. For SourceComms, if I mute someone with with -1 minutes, they leave the server and then rejoin, they are still muted.

@InvexByte

This comment has been minimized.

Copy link
Contributor

InvexByte commented Jan 5, 2018

Currently, session mutes do not work as intended.
A session mute should mute the client until they reconnect.

Right now, it reapplies mutes for people that rejoin.
This is because g_MuteType[client] is initilized to bNot when a new client joins via OnClientConnected -> MarkClientAsUnMuted.

Then in Query_VerifyBlock where mutes are applied, the following check is made:
if (g_MuteType[client] < bTime).
This will always evaluate to true meaning a mute is applied for all types bSesh, bTime and bPerm.

Sessions thus only expire after 120 minutes (which is the expiry time is set to).
Thus session mutes currently act as a 120 minute mute.

The above is also true for gags.

That is the cause of the issue, making a PR shortly.

@InvexByte InvexByte referenced this issue Jan 5, 2018

Merged

Fix session mutes/gags #384

3 of 7 tasks complete

@Groruk Groruk closed this in 24165c4 Jan 10, 2018

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