Skip to content
This repository has been archived by the owner on Jun 30, 2022. It is now read-only.

Can't put IRC users in config.robot.admins #4

Closed
saltire opened this issue Jun 4, 2014 · 1 comment
Closed

Can't put IRC users in config.robot.admins #4

saltire opened this issue Jun 4, 2014 · 1 comment

Comments

@saltire
Copy link

saltire commented Jun 4, 2014

In CinchPlugin::user_by_nick, when an IRC user is created, their nick is used as the name and a random UUID is used as the id.

User::user_is_admin? checks if the user id is in the config.robot.admins array, which of course it won't be since it's a UUID rather than the nick.

Is there a reason we can't just use the nick as the user id?

@jimmycuadra
Copy link
Collaborator

This was essentially a mistake in lita-irc's design. The idea was that the UUID would be the user's unique ID, since on IRC you can change your nickname at any time. That ended up not really making sense, though, since changing your nickname also creates a new UUID with no way to determine that they are the same person.

The quick and dirty fix is to use the UUIDs in config.robot.admins, which is dirty because Lita doesn't expose the UUIDs anywhere and you'd have to connect to Redis directly to fish them out.

The next major version of lita-irc will likely just use nicknames as IDs.

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

2 participants