mirror of
https://github.com/fluffle/goirc
synced 2025-07-01 02:53:53 +00:00
Fix panic when String is called on nil mode pointers. Fixes #98.
This commit is contained in:
parent
47162eb0b8
commit
08c1bcf174
2 changed files with 9 additions and 0 deletions
|
@ -183,6 +183,9 @@ func (nk *nick) String() string {
|
|||
// Returns a string representing the nick modes. Looks like:
|
||||
// +iwx
|
||||
func (nm *NickMode) String() string {
|
||||
if nm == nil {
|
||||
return "No modes set"
|
||||
}
|
||||
str := "+"
|
||||
v := reflect.Indirect(reflect.ValueOf(nm))
|
||||
t := v.Type()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue