4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-06 00:14:07 +00:00

Update vendor

* go-telegram-bot-api/telegram-bot-api
* lrstanley/girc
* matterbridge/gomatrix
This commit is contained in:
Wim
2019-01-03 00:07:50 +01:00
parent c585d00f16
commit d2044c647b
18 changed files with 310 additions and 72 deletions

View File

@ -516,7 +516,8 @@ const (
// Source represents the sender of an IRC event, see RFC1459 section 2.3.1.
// <servername> | <nick> [ '!' <user> ] [ '@' <host> ]
type Source struct {
// Name is the nickname, server name, or service name.
// Name is the nickname, server name, or service name, in its original
// non-rfc1459 form.
Name string `json:"name"`
// Ident is commonly known as the "user".
Ident string `json:"ident"`
@ -525,6 +526,12 @@ type Source struct {
Host string `json:"host"`
}
// ID is the nickname, server name, or service name, in it's converted
// and comparable) form.
func (s *Source) ID() string {
return ToRFC1459(s.Name)
}
// Equals compares two Sources for equality.
func (s *Source) Equals(ss *Source) bool {
if s == nil && ss == nil {
@ -533,7 +540,7 @@ func (s *Source) Equals(ss *Source) bool {
if s != nil && ss == nil || s == nil && ss != nil {
return false
}
if s.Name != ss.Name || s.Ident != ss.Ident || s.Host != ss.Host {
if s.ID() != ss.ID() || s.Ident != ss.Ident || s.Host != ss.Host {
return false
}
return true