diff options
author | Wim <wim@42.be> | 2017-11-30 00:27:31 +0100 |
---|---|---|
committer | Wim <wim@42.be> | 2017-11-30 00:27:31 +0100 |
commit | cc3c1681622ccbf304edc2fce05169ce983560ab (patch) | |
tree | 3a26d8bf6824e7ff33b476931fbe8610400ad71e /vendor/github.com/lrstanley/girc/format.go | |
parent | 1ee6837f0e8e88aa02b6af8c29c1cc6c29ed0dd3 (diff) | |
download | matterbridge-msglm-cc3c1681622ccbf304edc2fce05169ce983560ab.tar.gz matterbridge-msglm-cc3c1681622ccbf304edc2fce05169ce983560ab.tar.bz2 matterbridge-msglm-cc3c1681622ccbf304edc2fce05169ce983560ab.zip |
Update vendor lrstanley/girc
Diffstat (limited to 'vendor/github.com/lrstanley/girc/format.go')
-rw-r--r-- | vendor/github.com/lrstanley/girc/format.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/github.com/lrstanley/girc/format.go b/vendor/github.com/lrstanley/girc/format.go index 5d32f8ad..16639938 100644 --- a/vendor/github.com/lrstanley/girc/format.go +++ b/vendor/github.com/lrstanley/girc/format.go @@ -233,6 +233,7 @@ func IsValidNick(nick string) bool { for i := 1; i < len(nick); i++ { if (nick[i] < 0x41 || nick[i] > 0x7D) && (nick[i] < 0x30 || nick[i] > 0x39) && nick[i] != 0x2D { + fmt.Println(nick[i], i, nick) // a-z, A-Z, 0-9, -, and _\[]{}^| return false } @@ -291,7 +292,9 @@ func IsValidUser(name string) bool { // ToRFC1459 converts a string to the stripped down conversion within RFC // 1459. This will do things like replace an "A" with an "a", "[]" with "{}", // and so forth. Useful to compare two nicknames or channels. -func ToRFC1459(input string) (out string) { +func ToRFC1459(input string) string { + var out string + for i := 0; i < len(input); i++ { if input[i] >= 65 && input[i] <= 94 { out += string(rune(input[i]) + 32) |