Parnassius / cerbottana

GNU General Public License v3.0
1 stars 5 forks source link

Add command to force join/leave a room #162

Open f0ffee opened 3 years ago

f0ffee commented 3 years ago

Scope: bot admins, + maybe room owners of rooms the bot is already in to make it leave?

Parnassius commented 3 years ago

it could probably also listen to /invite i'm not sure about .leave (or something like that) for room owners, because on the next bot/server restart it would join there once again. EDIT: and we should check what happens when it's invited in a battle

palt0 commented 3 years ago

Summing up:

I created a draft branch some days ago and would like some feedback/confirmation on these points. On a side note, I improved the base logic that handles joining rooms and added a handler for |deinit|.

Parnassius commented 3 years ago
  • What is the correct permission level for these commands? I got told that joining/leaving a room shouldn't be persistent to bot restart, so the main innovation would be joining temporary rooms such as groupchats. Considering that there are only 3 bot administrators currently, it might make sense to enable the botjoin command for global voices too.

Ideally I would do something like this:

So, we have these problems:

  • Do we want to support joining battle rooms? All of the room activity commands (creating tours, minigames, etc.) would fail silently in battle rooms, as of now.

I'd say yes, eventually adding an additional parameter to command_wrapper.

  • We could maybe listen to /invite alongside (or instead of) having a botjoin command.

Absolutely, if that's not too complicated (i have no idea how /invite is handled protocol-wise).

  • Regarding the botleave command, bot administrators should be able to use it for any room as a safety measure, but we could disable it for everyone else if the room is joined by cerbottana at autostart.

I agree

I created a draft branch some days ago and would like some feedback/confirmation on these points. On a side note, I improved the base logic that handles joining rooms and added a handler for |deinit|.

I had a quick look and it seems good, i'll check more thoroughly in the next few days.