diff options
author | Wim <wim@42.be> | 2017-12-02 23:58:02 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-12-02 23:58:02 +0100 |
commit | 788d3b32ac50430ee38feb996d068860beaa679e (patch) | |
tree | 51d0fdf1b9fa70c25cda534a2bfe866ac57804ae /vendor/github.com/lrstanley/girc/event.go | |
parent | 1d414cf2fdbbf642307bea81756d95b6793a0f9d (diff) | |
download | matterbridge-msglm-788d3b32ac50430ee38feb996d068860beaa679e.tar.gz matterbridge-msglm-788d3b32ac50430ee38feb996d068860beaa679e.tar.bz2 matterbridge-msglm-788d3b32ac50430ee38feb996d068860beaa679e.zip |
Update vendor lrstanley/girc and readme
Diffstat (limited to 'vendor/github.com/lrstanley/girc/event.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/event.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/vendor/github.com/lrstanley/girc/event.go b/vendor/github.com/lrstanley/girc/event.go index 77d9b45e..ef7209ed 100644 --- a/vendor/github.com/lrstanley/girc/event.go +++ b/vendor/github.com/lrstanley/girc/event.go @@ -11,8 +11,8 @@ import ( ) const ( - eventSpace byte = 0x20 // Separator. - maxLength = 510 // Maximum length is 510 (2 for line endings). + eventSpace byte = ' ' // Separator. + maxLength = 510 // Maximum length is 510 (2 for line endings). ) // cutCRFunc is used to trim CR characters from prefixes/messages. @@ -256,7 +256,7 @@ func (e *Event) Bytes() []byte { // Strip newlines and carriage returns. for i := 0; i < len(out); i++ { - if out[i] == 0x0A || out[i] == 0x0D { + if out[i] == '\n' || out[i] == '\r' { out = append(out[:i], out[i+1:]...) i-- // Decrease the index so we can pick up where we left off. } @@ -432,9 +432,9 @@ func (e *Event) StripAction() string { } const ( - messagePrefix byte = 0x3A // ":" -- prefix or last argument - prefixIdent byte = 0x21 // "!" -- username - prefixHost byte = 0x40 // "@" -- hostname + messagePrefix byte = ':' // Prefix or last argument. + prefixIdent byte = '!' // Username. + prefixHost byte = '@' // Hostname. ) // Source represents the sender of an IRC event, see RFC1459 section 2.3.1. |