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

How to delete a room #224

Closed
gansheer opened this issue Jul 23, 2024 · 7 comments
Closed

How to delete a room #224

gansheer opened this issue Jul 23, 2024 · 7 comments

Comments

@gansheer
Copy link

gansheer commented Jul 23, 2024

Is there a command that allows to delete a room (we tried rm #room-name and other equivalent without any success) ?

@quackduck
Copy link
Owner

that wouldn't be too hard to add to clean up extra rooms. i'd probably want it to be admin-use only. thoughts @Arkaeriit?

@gansheer
Copy link
Author

gansheer commented Jul 24, 2024

Naively I through the rm command would do something since it displays some help text, but with this code there is no chance 😄 :

devzat/commands.go

Lines 684 to 691 in 3d2d744

func rmCMD(line string, u *User) {
if line == "" {
u.room.broadcast("", `usage: rm [-f | -i] [-dPRrvW] file ...
unlink file`)
} else {
u.room.broadcast("", "rm: "+line+": Permission denied, sucker")
}
}

And having the feature only for admin would be ideal IMHO.

@Arkaeriit
Copy link
Collaborator

Arkaeriit commented Jul 25, 2024

that wouldn't be too hard to add to clean up extra rooms. i'd probably want it to be admin-use only. thoughts @Arkaeriit?

A command to delete empty room would be a good idea. I don't think it would need need admin access as deleting empty rooms is harmless.

@Arkaeriit
Copy link
Collaborator

Should that command be rm or rmdir ?

@gansheer
Copy link
Author

A command to delete empty room would be a good idea. I don't think it would need need admin access as deleting empty rooms is harmless.

Out of curiousity, what is constitute a room as empty ? A room without any users using it at the time of the deletion ?

@quackduck
Copy link
Owner

Yes, can't see what else it could be tbh

@Arkaeriit
Copy link
Collaborator

We can probably close this now that #226 has been merged.

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

No branches or pull requests

3 participants