diff options
author | Wim <wim@42.be> | 2019-01-03 00:07:50 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2019-01-03 00:07:50 +0100 |
commit | d2044c647b2e57ec5d5a7684177cf5e2e3325714 (patch) | |
tree | c0cd092f4cb2bb528f455e33d7f989e8f3099b7b /vendor/github.com/lrstanley/girc/state.go | |
parent | c585d00f162cc244b381fcaaef7ac5b1efda2cf5 (diff) | |
download | matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.tar.gz matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.tar.bz2 matterbridge-msglm-d2044c647b2e57ec5d5a7684177cf5e2e3325714.zip |
Update vendor
* go-telegram-bot-api/telegram-bot-api
* lrstanley/girc
* matterbridge/gomatrix
Diffstat (limited to 'vendor/github.com/lrstanley/girc/state.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/state.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/vendor/github.com/lrstanley/girc/state.go b/vendor/github.com/lrstanley/girc/state.go index 36dcc82b..0660a686 100644 --- a/vendor/github.com/lrstanley/girc/state.go +++ b/vendor/github.com/lrstanley/girc/state.go @@ -419,14 +419,16 @@ func (s *state) lookupUser(name string) *User { } // createUser creates the user in state, if not already done. -func (s *state) createUser(nick string) (ok bool) { - if _, ok := s.users[ToRFC1459(nick)]; ok { +func (s *state) createUser(src *Source) (ok bool) { + if _, ok := s.users[src.ID()]; ok { // User already exists. return false } - s.users[ToRFC1459(nick)] = &User{ - Nick: nick, + s.users[src.ID()] = &User{ + Nick: src.Name, + Host: src.Host, + Ident: src.Ident, FirstSeen: time.Now(), LastActive: time.Now(), Perms: &UserPerms{channels: make(map[string]Perms)}, |