Skip to content
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.

area_kick kinda works in a wrong way #174

Open
Lernos opened this issue May 2, 2021 · 0 comments
Open

area_kick kinda works in a wrong way #174

Lernos opened this issue May 2, 2021 · 0 comments

Comments

@Lernos
Copy link
Contributor

Lernos commented May 2, 2021

Considering how it's made, area_kick basically checks if the area the client executing it from is locked, and if it is, then happily kicks the target from their current area to the target area, even if they were in another one. The client executing the command will, however, see an internal error message - that's because when attempting to execute if client.area.is_locked != client.area.Locked.FREE: client.area.invite_list.pop(c.id) the area tries to pop the target from the area invite list and they weren't in it in the first place. The way I see it, we should either let mods kick target from any area to any area, whether the mod's area is locked or not and whether they're in the same area with the target or not, or to restrict kicking to current area only. The former can be made possible by removing if client.area.is_locked == client.area.Locked.FREE: raise ClientError('Area isn\'t locked.') from the beginning of ooc_cmd_area_kick and possibly adding a check so as to not raise any errors: if client.area.is_locked != client.area.Locked.FREE and c.id in client.area.invite_list: client.area.invite_list.pop(c.id)

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

No branches or pull requests

1 participant