Added ChannelMode.String() function
This commit is contained in:
parent
3f325e6652
commit
0017e3f574
17
rosella.go
17
rosella.go
@ -43,6 +43,23 @@ type ChannelMode struct {
|
|||||||
moderated bool //Only ops and voiced may speak
|
moderated bool //Only ops and voiced may speak
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (m *ChannelMode) String() string {
|
||||||
|
modeStr := ""
|
||||||
|
if m.anonymous {
|
||||||
|
modeStr += "a"
|
||||||
|
}
|
||||||
|
if m.secret {
|
||||||
|
modeStr += "s"
|
||||||
|
}
|
||||||
|
if m.topicLocked {
|
||||||
|
modeStr += "t"
|
||||||
|
}
|
||||||
|
if m.moderated {
|
||||||
|
modeStr += "m"
|
||||||
|
}
|
||||||
|
return modeStr
|
||||||
|
}
|
||||||
|
|
||||||
type ClientMode struct {
|
type ClientMode struct {
|
||||||
operator bool //Channel operator
|
operator bool //Channel operator
|
||||||
voice bool //Has voice
|
voice bool //Has voice
|
||||||
|
Loading…
Reference in New Issue
Block a user