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.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. // Languages is this proposed IRCv3 capability: https://gist.github.com/DanielOaks/8126122f74b26012a3de37db80e4e0c6
  28. Languages Capability = "draft/languages"
  29. // MaxLine is this capability: https://oragono.io/maxline
  30. MaxLine Capability = "oragono.io/maxline"
  31. // MessageTags is this draft IRCv3 capability: http://ircv3.net/specs/core/message-tags-3.3.html
  32. MessageTags Capability = "draft/message-tags-0.2"
  33. // MultiPrefix is this IRCv3 capability: http://ircv3.net/specs/extensions/multi-prefix-3.1.html
  34. MultiPrefix Capability = "multi-prefix"
  35. // Rename is this proposed capability: https://github.com/SaberUK/ircv3-specifications/blob/rename/extensions/rename.md
  36. Rename Capability = "draft/rename"
  37. // Resume is this proposed capability: https://github.com/DanielOaks/ircv3-specifications/blob/master+resume/extensions/resume.md
  38. Resume Capability = "draft/resume"
  39. // SASL is this IRCv3 capability: http://ircv3.net/specs/extensions/sasl-3.2.html
  40. SASL Capability = "sasl"
  41. // ServerTime is this IRCv3 capability: http://ircv3.net/specs/extensions/server-time-3.2.html
  42. ServerTime Capability = "server-time"
  43. // STS is this IRCv3 capability: http://ircv3.net/specs/extensions/sts.html
  44. STS Capability = "sts"
  45. // UserhostInNames is this IRCv3 capability: http://ircv3.net/specs/extensions/userhost-in-names-3.2.html
  46. UserhostInNames Capability = "userhost-in-names"
  47. )
  48. // Name returns the name of the given capability.
  49. func (capability Capability) Name() string {
  50. return string(capability)
  51. }
  52. // Version is used to select which max version of CAP the client supports.
  53. type Version uint
  54. const (
  55. // Cap301 refers to the base CAP spec.
  56. Cap301 Version = 301
  57. // Cap302 refers to the IRCv3.2 CAP spec.
  58. Cap302 Version = 302
  59. )