mirror of
https://github.com/fluffle/goirc
synced 2025-05-15 20:13:19 +00:00
Merge 41ccd6a8f6
into 08c1bcf174
This commit is contained in:
commit
e13696545a
1 changed files with 9 additions and 7 deletions
|
@ -188,13 +188,15 @@ func (nm *NickMode) String() string {
|
|||
}
|
||||
str := "+"
|
||||
v := reflect.Indirect(reflect.ValueOf(nm))
|
||||
t := v.Type()
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
switch f := v.Field(i); f.Kind() {
|
||||
// only bools here at the mo!
|
||||
case reflect.Bool:
|
||||
if f.Bool() {
|
||||
str += NickModeToString[t.Field(i).Name]
|
||||
if v.IsValid() {
|
||||
t := v.Type()
|
||||
for i := 0; i < v.NumField(); i++ {
|
||||
switch f := v.Field(i); f.Kind() {
|
||||
// only bools here at the mo!
|
||||
case reflect.Bool:
|
||||
if f.Bool() {
|
||||
str += NickModeToString[t.Field(i).Name]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue