mirror of
https://github.com/gissleh/irc.git
synced 2026-10-19 22:52:53 +00:00
20 lines
492 B
Go
20 lines
492 B
Go
package isupport
|
|
|
|
type State struct {
|
|
Raw map[string]string `json:"raw"`
|
|
Prefixes map[rune]rune `json:"-"`
|
|
ModeOrder string `json:"modeOrder"`
|
|
PrefixOrder string `json:"prefixOrder"`
|
|
ChannelModes []string `json:"channelModes"`
|
|
}
|
|
|
|
func (state *State) Copy() *State {
|
|
stateCopy := *state
|
|
stateCopy.Raw = make(map[string]string, len(state.Raw))
|
|
for key, value := range state.Raw {
|
|
stateCopy.Raw[key] = value
|
|
}
|
|
|
|
return &stateCopy
|
|
}
|