summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/lrstanley/girc/ctcp.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/ctcp.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/ctcp.go')
-rw-r--r--vendor/github.com/lrstanley/girc/ctcp.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/lrstanley/girc/ctcp.go b/vendor/github.com/lrstanley/girc/ctcp.go
index c6c0bace..6076ab10 100644
--- a/vendor/github.com/lrstanley/girc/ctcp.go
+++ b/vendor/github.com/lrstanley/girc/ctcp.go
@@ -58,7 +58,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
if s < 0 {
for i := 0; i < len(text); i++ {
// Check for A-Z, 0-9.
- if (text[i] < 0x41 || text[i] > 0x5A) && (text[i] < 0x30 || text[i] > 0x39) {
+ if (text[i] < 'A' || text[i] > 'Z') && (text[i] < '0' || text[i] > '9') {
return nil
}
}
@@ -74,7 +74,7 @@ func decodeCTCP(e *Event) *CTCPEvent {
// Loop through checking the tag first.
for i := 0; i < s; i++ {
// Check for A-Z, 0-9.
- if (text[i] < 0x41 || text[i] > 0x5A) && (text[i] < 0x30 || text[i] > 0x39) {
+ if (text[i] < 'A' || text[i] > 'Z') && (text[i] < '0' || text[i] > '9') {
return nil
}
}
@@ -168,7 +168,7 @@ func (c *CTCP) parseCMD(cmd string) string {
for i := 0; i < len(cmd); i++ {
// Check for A-Z, 0-9.
- if (cmd[i] < 0x41 || cmd[i] > 0x5A) && (cmd[i] < 0x30 || cmd[i] > 0x39) {
+ if (cmd[i] < 'A' || cmd[i] > 'Z') && (cmd[i] < '0' || cmd[i] > '9') {
return ""
}
}