This commit is contained in:
Dale Campbell 2018-09-06 21:19:33 +00:00 committed by GitHub
commit e13696545a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 7 deletions

View File

@ -188,6 +188,7 @@ func (nm *NickMode) String() string {
} }
str := "+" str := "+"
v := reflect.Indirect(reflect.ValueOf(nm)) v := reflect.Indirect(reflect.ValueOf(nm))
if v.IsValid() {
t := v.Type() t := v.Type()
for i := 0; i < v.NumField(); i++ { for i := 0; i < v.NumField(); i++ {
switch f := v.Field(i); f.Kind() { switch f := v.Field(i); f.Kind() {
@ -198,6 +199,7 @@ func (nm *NickMode) String() string {
} }
} }
} }
}
if str == "+" { if str == "+" {
str = "No modes set" str = "No modes set"
} }