This repository has been archived by the owner on Mar 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 194
IRC: Missing RealName on events #39
Comments
I've done a little digging, and both Telegram and Slack have a user ID for every user - Slack can have an e-mail address too, sometimes, but it's not a given. I propose to add an ID field to the User struct, which gets filled with user ID for Slack and Telegram, and I'll come up with a PR soon-ish. |
@doenietzomoeilijk hi, thanks for the interest in this project. Using the ID for me looks good enough, go for it :) |
doenietzomoeilijk
added a commit
to doenietzomoeilijk/go-chat-bot
that referenced
this issue
Feb 5, 2017
Also make sure it's filled in the appropriate places. This allows you to add some granularity to whom can run certain commands. Fixes go-chat-bot#39
fabioxgn
pushed a commit
that referenced
this issue
Feb 6, 2017
Also make sure it's filled in the appropriate places. This allows you to add some granularity to whom can run certain commands. Fixes #39
fabioxgn
pushed a commit
that referenced
this issue
Feb 22, 2017
* Add ID field to User struct Also make sure it's filled in the appropriate places. This allows you to add some granularity to whom can run certain commands. Fixes #39
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'd like to use go-chat-bot for IRC purposes, but I'm running into a snag. I can solve the snag, but I'm looking for some input on the best way to solve it.
The issue I'm running into is the fact that in
irc/irc.go
, on a privmsg event, the User is created with only his nick. If I want some command to be limited to certain user/host combo's, I'm out of luck, since I only have the nick to work with. As I see it, there's three ways of solving it:User.RealName
. This works, but it's slightly ugly since we're stuffing something that's not a RealName into a RealName.User.Host
. I'm not sure how that'd impact other networks, if at all. I don't know if you get that kind of info from Slack / Telegram, and whether they make any sense there. Still, this seems like the best solution to me.I think the second option would be the best one; it'd involve adding some properties to
User
that might go unused for non-IRC networks - I don't think that's a huge problem, but input on this would be welcome.I can come up with a pull request, of course.
The text was updated successfully, but these errors were encountered: