Skip to content
This repository has been archived by the owner on Jul 17, 2020. It is now read-only.

bot.isOwner only checks room 17 #213

Open
rlemon opened this issue Sep 8, 2014 · 8 comments
Open

bot.isOwner only checks room 17 #213

rlemon opened this issue Sep 8, 2014 · 8 comments
Labels

Comments

@rlemon
Copy link
Collaborator

rlemon commented Sep 8, 2014

Now that the bot is in the wild, shouldn't bot.isOwner check the users owner status from the room the command is invoked in?

I've tested this and only owners of room 17 can use use: 'OWNER' commands. Not sure if this is a bug or by design so I'll neglect a label on this one.

@allquixotic
Copy link

ENOREPRO in Root Access. I don't have owner in your room but I can invoke owner commands in RA.

http://chat.stackexchange.com/transcript/message/17563867#17563867

NOTE: Not sure if this is due to recent changes in Zirak master; I haven't synced my repo over in a while.

@rlemon
Copy link
Collaborator Author

rlemon commented Sep 8, 2014

Well an owner in the HTML room couldn't run any isOwner checked commands, and I was able to invoke one from the C# room, (which I'm not an owner). Adding the HTML user to the list of owners in the JS room allowed him to use an isOwner checked command.

@allquixotic
Copy link

Is it the same exact bot instance (Caprica Six) running in all those rooms? My intuition is that a bot instance will check if the user is an owner in the bot's first/primary room, but if you have a separate bot instance (different instance of firefox, or whatever) in each room, this issue won't occur.

@rlemon
Copy link
Collaborator Author

rlemon commented Sep 8, 2014

one instance of the bot.

@allquixotic
Copy link

OK, so this is most likely the situation.

Since the users data structure is shared between each room the bot is in, and there's no Map between room and owner flags, the bot literally does not store the data of whether each user is an owner in each of its rooms... so it's a valid defect, it's just being mischaracterized as being a hard-coding of 17 when it's not that at all.

@SomeKittens SomeKittens added the bug label Sep 8, 2014
@SomeKittens
Copy link
Contributor

Yeah, this is a bug

@Zirak
Copy link
Owner

Zirak commented Sep 9, 2014

It's a known issue, stemming from how the bot wasn't meant to be multi-room. Fixing this requires redoing how the bot handles users in general.

@FreezePhoenix
Copy link
Contributor

I believe, from running it myself, that a series of users are defined as owners:

  • Those who were or are mods; and
  • Those who own a room the bot has been in.

This can be overridden in several ways. I will describe them if someone asks.

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

No branches or pull requests

5 participants