You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 28, 2023. It is now read-only.
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)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 removingif 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)
The text was updated successfully, but these errors were encountered: