Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

capability.go 1.2KB

12345678910111213141516171819202122232425262728293031
  1. // Copyright (c) 2012-2014 Jeremy Latt
  2. // Copyright (c) 2016-2017 Daniel Oaks <daniel@danieloaks.net>
  3. // released under the MIT license
  4. package irc
  5. import (
  6. "github.com/oragono/oragono/irc/caps"
  7. )
  8. var (
  9. // SupportedCapabilities are the caps we advertise.
  10. // MaxLine, SASL and STS are set during server startup.
  11. SupportedCapabilities = caps.NewSet(caps.AccountTag, caps.AccountNotify, caps.AwayNotify, caps.CapNotify, caps.ChgHost, caps.EchoMessage, caps.ExtendedJoin, caps.InviteNotify, caps.Languages, caps.MessageTags, caps.MultiPrefix, caps.Rename, caps.Resume, caps.ServerTime, caps.UserhostInNames)
  12. // CapValues are the actual values we advertise to v3.2 clients.
  13. // actual values are set during server startup.
  14. CapValues = caps.NewValues()
  15. )
  16. // CapState shows whether we're negotiating caps, finished, etc for connection registration.
  17. type CapState uint
  18. const (
  19. // CapNone means CAP hasn't been negotiated at all.
  20. CapNone CapState = iota
  21. // CapNegotiating means CAP is being negotiated and registration should be paused.
  22. CapNegotiating CapState = iota
  23. // CapNegotiated means CAP negotiation has been successfully ended and reg should complete.
  24. CapNegotiated CapState = iota
  25. )