mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-26 20:52:38 +01:00
fix #1327
This commit is contained in:
parent
a412870514
commit
4b2a094921
@ -222,6 +222,7 @@ func realSkeleton(name string) (string, error) {
|
||||
// Shivaram@good-fortune -> *!shivaram@good-fortune
|
||||
// EDMUND -> edmund!*@*
|
||||
func CanonicalizeMaskWildcard(userhost string) (expanded string, err error) {
|
||||
userhost = strings.TrimSpace(userhost)
|
||||
var nick, user, host string
|
||||
bangIndex := strings.IndexByte(userhost, '!')
|
||||
strudelIndex := strings.IndexByte(userhost, '@')
|
||||
|
@ -215,6 +215,7 @@ func TestCanonicalizeMaskWildcard(t *testing.T) {
|
||||
tester("shivaram*", "shivaram*!*@*", nil)
|
||||
tester("Shivaram*", "shivaram*!*@*", nil)
|
||||
tester("*SHIVARAM*", "*shivaram*!*@*", nil)
|
||||
tester("*SHIVARAM* ", "*shivaram*!*@*", nil)
|
||||
}
|
||||
|
||||
func validFoldTester(first, second string, equal bool, folder func(string) (string, error), t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user