Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. // Copyright (c) 2012-2014 Jeremy Latt
  2. // Copyright (c) 2014-2015 Edmund Huber
  3. // Copyright (c) 2016-2017 Daniel Oaks <daniel@danieloaks.net>
  4. // released under the MIT license
  5. package irc
  6. import (
  7. "errors"
  8. "github.com/oragono/oragono/irc/utils"
  9. )
  10. // Runtime Errors
  11. var (
  12. errAccountAlreadyRegistered = errors.New(`Account already exists`)
  13. errAccountAlreadyVerified = errors.New(`Account is already verified`)
  14. errAccountCantDropPrimaryNick = errors.New("Can't unreserve primary nickname")
  15. errAccountCreation = errors.New("Account could not be created")
  16. errAccountDoesNotExist = errors.New("Account does not exist")
  17. errAccountInvalidCredentials = errors.New("Invalid account credentials")
  18. errAccountBadPassphrase = errors.New(`Passphrase contains forbidden characters or is otherwise invalid`)
  19. errAccountNickReservationFailed = errors.New("Could not (un)reserve nick")
  20. errAccountNotLoggedIn = errors.New("You're not logged into an account")
  21. errAccountTooManyNicks = errors.New("Account has too many reserved nicks")
  22. errAccountUnverified = errors.New(`Account is not yet verified`)
  23. errAccountVerificationFailed = errors.New("Account verification failed")
  24. errAccountVerificationInvalidCode = errors.New("Invalid account verification code")
  25. errAccountUpdateFailed = errors.New(`Error while updating your account information`)
  26. errAccountMustHoldNick = errors.New(`You must hold that nickname in order to register it`)
  27. errAuthzidAuthcidMismatch = errors.New(`authcid and authzid must be the same`)
  28. errCallbackFailed = errors.New("Account verification could not be sent")
  29. errCertfpAlreadyExists = errors.New(`An account already exists for your certificate fingerprint`)
  30. errChannelNotOwnedByAccount = errors.New("Channel not owned by the specified account")
  31. errChannelTransferNotOffered = errors.New(`You weren't offered ownership of that channel`)
  32. errChannelAlreadyRegistered = errors.New("Channel is already registered")
  33. errChannelNotRegistered = errors.New("Channel is not registered")
  34. errChannelNameInUse = errors.New(`Channel name in use`)
  35. errInvalidChannelName = errors.New(`Invalid channel name`)
  36. errMonitorLimitExceeded = errors.New("Monitor limit exceeded")
  37. errNickMissing = errors.New("nick missing")
  38. errNicknameInvalid = errors.New("invalid nickname")
  39. errNicknameInUse = errors.New("nickname in use")
  40. errNicknameReserved = errors.New("nickname is reserved")
  41. errNickAccountMismatch = errors.New(`Your nickname must match your account name; try logging out and logging back in with SASL`)
  42. errNoExistingBan = errors.New("Ban does not exist")
  43. errNoSuchChannel = errors.New(`No such channel`)
  44. errChannelPurged = errors.New(`This channel was purged by the server operators and cannot be used`)
  45. errConfusableIdentifier = errors.New("This identifier is confusable with one already in use")
  46. errInsufficientPrivs = errors.New("Insufficient privileges")
  47. errInvalidUsername = errors.New("Invalid username")
  48. errFeatureDisabled = errors.New(`That feature is disabled`)
  49. errBanned = errors.New("IP or nickmask banned")
  50. errInvalidParams = utils.ErrInvalidParams
  51. errNoVhost = errors.New(`You do not have an approved vhost`)
  52. errVhostsForbidden = errors.New(`An administrator has denied you the ability to use vhosts`)
  53. errLimitExceeded = errors.New("Limit exceeded")
  54. errNoop = errors.New("Action was a no-op")
  55. errCASFailed = errors.New("Compare-and-swap update of database value failed")
  56. errEmptyCredentials = errors.New("No more credentials are approved")
  57. errCredsExternallyManaged = errors.New("Credentials are externally managed and cannot be changed here")
  58. )
  59. // Socket Errors
  60. var (
  61. errNoPeerCerts = errors.New("Client did not provide a certificate")
  62. errNotTLS = errors.New("Not a TLS connection")
  63. errReadQ = errors.New("ReadQ Exceeded")
  64. )
  65. // String Errors
  66. var (
  67. errCouldNotStabilize = errors.New("Could not stabilize string while casefolding")
  68. errStringIsEmpty = errors.New("String is empty")
  69. errInvalidCharacter = errors.New("Invalid character")
  70. )
  71. // Config Errors
  72. var (
  73. ErrDatastorePathMissing = errors.New("Datastore path missing")
  74. ErrInvalidCertKeyPair = errors.New("tls cert+key: invalid pair")
  75. ErrLimitsAreInsane = errors.New("Limits aren't setup properly, check them and make them sane")
  76. ErrLineLengthsTooSmall = errors.New("Line lengths must be 512 or greater (check the linelen section under server->limits)")
  77. ErrLoggerExcludeEmpty = errors.New("Encountered logging type '-' with no type to exclude")
  78. ErrLoggerFilenameMissing = errors.New("Logging configuration specifies 'file' method but 'filename' is empty")
  79. ErrLoggerHasNoTypes = errors.New("Logger has no types to log")
  80. ErrNetworkNameMissing = errors.New("Network name missing")
  81. ErrNoFingerprintOrPassword = errors.New("Fingerprint or password needs to be specified")
  82. ErrNoListenersDefined = errors.New("Server listening addresses missing")
  83. ErrOperClassDependencies = errors.New("OperClasses contains a looping dependency, or a class extends from a class that doesn't exist")
  84. ErrServerNameMissing = errors.New("Server name missing")
  85. ErrServerNameNotHostname = errors.New("Server name must match the format of a hostname")
  86. )