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.

constants.go 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (c) 2017 Daniel Oaks <daniel@danieloaks.net>
  2. // released under the MIT license
  3. package caps
  4. // Capability represents an optional feature that a client may request from the server.
  5. type Capability string
  6. const (
  7. // AccountNotify is this IRCv3 capability: http://ircv3.net/specs/extensions/account-notify-3.1.html
  8. AccountNotify Capability = "account-notify"
  9. // AccountTag is this IRCv3 capability: http://ircv3.net/specs/extensions/account-tag-3.2.html
  10. AccountTag Capability = "account-tag"
  11. // AwayNotify is this IRCv3 capability: http://ircv3.net/specs/extensions/away-notify-3.1.html
  12. AwayNotify Capability = "away-notify"
  13. // Batch is this IRCv3 capability: http://ircv3.net/specs/extensions/batch-3.2.html
  14. Batch Capability = "batch"
  15. // CapNotify is this IRCv3 capability: http://ircv3.net/specs/extensions/cap-notify-3.2.html
  16. CapNotify Capability = "cap-notify"
  17. // ChgHost is this IRCv3 capability: http://ircv3.net/specs/extensions/chghost-3.2.html
  18. ChgHost Capability = "chghost"
  19. // EchoMessage is this IRCv3 capability: http://ircv3.net/specs/extensions/echo-message-3.2.html
  20. EchoMessage Capability = "echo-message"
  21. // ExtendedJoin is this IRCv3 capability: http://ircv3.net/specs/extensions/extended-join-3.1.html
  22. ExtendedJoin Capability = "extended-join"
  23. // InviteNotify is this IRCv3 capability: http://ircv3.net/specs/extensions/invite-notify-3.2.html
  24. InviteNotify Capability = "invite-notify"
  25. // LabeledResponse is this draft IRCv3 capability: http://ircv3.net/specs/extensions/labeled-response.html
  26. LabeledResponse Capability = "draft/labeled-response"
  27. // MaxLine is this proposed capability: https://github.com/DanielOaks/ircv3-specifications/blob/master+line-lengths/extensions/line-lengths.md
  28. MaxLine Capability = "draft/maxline"
  29. // MessageTags is this draft IRCv3 capability: http://ircv3.net/specs/core/message-tags-3.3.html
  30. MessageTags Capability = "draft/message-tags-0.2"
  31. // MultiPrefix is this IRCv3 capability: http://ircv3.net/specs/extensions/multi-prefix-3.1.html
  32. MultiPrefix Capability = "multi-prefix"
  33. // Rename is this proposed capability: https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md
  34. Rename Capability = "draft/rename"
  35. // SASL is this IRCv3 capability: http://ircv3.net/specs/extensions/sasl-3.2.html
  36. SASL Capability = "sasl"
  37. // ServerTime is this IRCv3 capability: http://ircv3.net/specs/extensions/server-time-3.2.html
  38. ServerTime Capability = "server-time"
  39. // STS is this draft IRCv3 capability: http://ircv3.net/specs/core/sts-3.3.html
  40. STS Capability = "draft/sts"
  41. // UserhostInNames is this IRCv3 capability: http://ircv3.net/specs/extensions/userhost-in-names-3.2.html
  42. UserhostInNames Capability = "userhost-in-names"
  43. )
  44. // Name returns the name of the given capability.
  45. func (capability Capability) Name() string {
  46. return string(capability)
  47. }
  48. // Version is used to select which max version of CAP the client supports.
  49. type Version uint
  50. const (
  51. // Cap301 refers to the base CAP spec.
  52. Cap301 Version = 301
  53. // Cap302 refers to the IRCv3.2 CAP spec.
  54. Cap302 Version = 302
  55. )