summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lrstanley/girc/modes.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-12-02 23:58:02 +0100
committerWim <wim@42.be>2017-12-02 23:58:02 +0100
commit788d3b32ac50430ee38feb996d068860beaa679e (patch)
tree51d0fdf1b9fa70c25cda534a2bfe866ac57804ae /vendor/github.com/lrstanley/girc/modes.go
parent1d414cf2fdbbf642307bea81756d95b6793a0f9d (diff)
downloadmatterbridge-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/modes.go')
-rw-r--r--vendor/github.com/lrstanley/girc/modes.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/github.com/lrstanley/girc/modes.go b/vendor/github.com/lrstanley/girc/modes.go
index c0ad7d11..864df71f 100644
--- a/vendor/github.com/lrstanley/girc/modes.go
+++ b/vendor/github.com/lrstanley/girc/modes.go
@@ -206,11 +206,11 @@ func (c *CModes) Parse(flags string, args []string) (out []CMode) {
var argCount int
for i := 0; i < len(flags); i++ {
- if flags[i] == 0x2B {
+ if flags[i] == '+' {
add = true
continue
}
- if flags[i] == 0x2D {
+ if flags[i] == '-' {
add = false
continue
}
@@ -265,7 +265,7 @@ func IsValidChannelMode(raw string) bool {
for i := 0; i < len(raw); i++ {
// Allowed are: ",", A-Z and a-z.
- if raw[i] != 0x2C && (raw[i] < 0x41 || raw[i] > 0x5A) && (raw[i] < 0x61 || raw[i] > 0x7A) {
+ if raw[i] != ',' && (raw[i] < 'A' || raw[i] > 'Z') && (raw[i] < 'a' || raw[i] > 'z') {
return false
}
}
@@ -279,7 +279,7 @@ func isValidUserPrefix(raw string) bool {
return false
}
- if raw[0] != 0x28 { // (.
+ if raw[0] != '(' {
return false
}
@@ -288,7 +288,7 @@ func isValidUserPrefix(raw string) bool {
// Skip the first one as we know it's (.
for i := 1; i < len(raw); i++ {
- if raw[i] == 0x29 { // ).
+ if raw[i] == ')' {
passedKeys = true
continue
}