Mirror of github.com/gissleh/irc
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
500 B

  1. package isupport
  2. type State struct {
  3. Raw map[string]string `json:"raw"`
  4. PrefixMap map[rune]rune `json:"prefixMap"`
  5. ModeOrder string `json:"modeOrder"`
  6. PrefixOrder string `json:"prefixOrder"`
  7. ChannelModes []string `json:"channelModes"`
  8. }
  9. func (state *State) Copy() *State {
  10. stateCopy := *state
  11. stateCopy.Raw = make(map[string]string, len(state.Raw))
  12. for key, value := range state.Raw {
  13. stateCopy.Raw[key] = value
  14. }
  15. return &stateCopy
  16. }