Force stop spectating/quit match if user is not spectating or multiplaying #12

Closed
opened 2016-11-17 19:25:47 +00:00 by Nyo · 0 comments
Nyo commented 2016-11-17 19:25:47 +00:00 (Migrated from zxq.co)

changeActionEvent.py

if userToken.spectating != 0 and userToken.actionID != actions.WATCHING and userToken.actionID != actions.IDLE and userToken.actionID != actions.AFK:
	userToken.stopSpectating()

# If we are not in multiplayer but we are in a match, part match
if userToken.matchID != -1 and userToken.actionID != actions.MULTIPLAYING and userToken.actionID != actions.MULTIPLAYER and userToken.actionID != actions.AFK:
	userToken.partMatch()

If doesn't work for multi, after finishing a song users get kicked. Maybe the client goes back to idle and then to multiplayer

NOTE: this shouldn't be needed, but it's another security check, so we avoid bugs in spect/multi

**changeActionEvent.py** ``` if userToken.spectating != 0 and userToken.actionID != actions.WATCHING and userToken.actionID != actions.IDLE and userToken.actionID != actions.AFK: userToken.stopSpectating() # If we are not in multiplayer but we are in a match, part match if userToken.matchID != -1 and userToken.actionID != actions.MULTIPLAYING and userToken.actionID != actions.MULTIPLAYER and userToken.actionID != actions.AFK: userToken.partMatch() ``` If doesn't work for multi, after finishing a song users get kicked. Maybe the client goes back to *idle* and then to *multiplayer* **NOTE:** *this shouldn't be needed, but it's another security check, so we avoid bugs in spect/multi*
Nyo (Migrated from zxq.co) closed this issue 2020-11-26 16:53:38 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ripple/pep.py#12
No description provided.