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/cap.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/cap.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/cap.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/vendor/github.com/lrstanley/girc/cap.go b/vendor/github.com/lrstanley/girc/cap.go index a63dfe9d..1d50460f 100644 --- a/vendor/github.com/lrstanley/girc/cap.go +++ b/vendor/github.com/lrstanley/girc/cap.go @@ -375,11 +375,11 @@ func handleTags(c *Client, e Event) { } const ( - prefixTag byte = 0x40 // @ - prefixTagValue byte = 0x3D // = - prefixUserTag byte = 0x2B // + - tagSeparator byte = 0x3B // ; - maxTagLength int = 511 // 510 + @ and " " (space), though space usually not included. + prefixTag byte = '@' + prefixTagValue byte = '=' + prefixUserTag byte = '+' + tagSeparator byte = ';' + maxTagLength int = 511 // 510 + @ and " " (space), though space usually not included. ) // Tags represents the key-value pairs in IRCv3 message tags. The map contains @@ -618,7 +618,7 @@ func validTag(name string) bool { for i := 0; i < len(name); i++ { // A-Z, a-z, 0-9, -/._ - if (name[i] < 0x41 || name[i] > 0x5A) && (name[i] < 0x61 || name[i] > 0x7A) && (name[i] < 0x2D || name[i] > 0x39) && name[i] != 0x5F { + if (name[i] < 'A' || name[i] > 'Z') && (name[i] < 'a' || name[i] > 'z') && (name[i] < '-' || name[i] > '9') && name[i] != '_' { return false } } @@ -631,7 +631,7 @@ func validTag(name string) bool { func validTagValue(value string) bool { for i := 0; i < len(value); i++ { // Don't allow any invisible chars within the tag, or semicolons. - if value[i] < 0x21 || value[i] > 0x7E || value[i] == 0x3B { + if value[i] < '!' || value[i] > '~' || value[i] == ';' { return false } } |