nmdc-ircfrontend/typedefs.go

59 lines
1022 B
Go
Raw Normal View History

2013-08-23 01:03:37 +00:00
package main
2016-05-03 06:25:27 +00:00
import (
"regexp"
)
2013-08-23 01:03:37 +00:00
const (
VERSION = "1.0.0"
APP_DESCRIPTION = "nmdc-ircfrontend v" + VERSION
BLESSED_CHANNEL = "#chat" // must be lowercase
BLESSED_CHANNEL_MODE = "n" // means that you have to be in the channel to chat, but that's it
NICKS_PER_PROTOMSG = 128 //The capacity sets the max number of nicks to send per message
CLIENT_READ_BUFFSIZE = 512
CLIENT_READ_TIMEOUT_SEC = 3
2016-05-03 06:25:27 +00:00
)
2013-08-23 01:03:37 +00:00
2016-05-03 06:25:27 +00:00
var (
nickRegexp = regexp.MustCompile(`^[a-zA-Z\[\]_^{|}][a-zA-Z0-9\[\]_^{|}]*$`)
channelRegexp = regexp.MustCompile(`^#[a-zA-Z0-9_\-]+$`)
)
2013-08-23 01:03:37 +00:00
2013-08-24 19:58:38 +00:00
type replyCode int
2013-08-23 01:03:37 +00:00
const (
2013-08-24 19:58:38 +00:00
rplWelcome replyCode = iota
rplJoin
rplPart
2013-08-23 01:03:37 +00:00
rplTopic
rplNoTopic
2013-08-23 01:03:37 +00:00
rplNames
rplEndOfNames
2013-08-23 01:03:37 +00:00
rplNickChange
rplKill
2013-08-23 16:39:10 +00:00
rplMsg
2013-08-23 21:09:29 +00:00
rplList
rplListEnd
2013-08-23 22:59:33 +00:00
rplOper
2013-08-27 18:34:52 +00:00
rplChannelModeIs
2013-08-29 20:10:28 +00:00
rplKick
2013-08-30 22:17:54 +00:00
rplInfo
rplVersion
rplMOTDStart
2013-09-08 15:06:03 +00:00
rplMOTD
rplEndOfMOTD
2013-10-21 12:34:12 +00:00
rplPong
2013-08-23 01:03:37 +00:00
errMoreArgs
errNoNick
errInvalidNick
errNickInUse
errAlreadyReg
errNoSuchNick
2013-08-23 14:39:40 +00:00
errUnknownCommand
2013-08-23 15:24:06 +00:00
errNotReg
2013-08-23 22:59:33 +00:00
errPassword
2013-08-23 23:18:54 +00:00
errNoPriv
2013-08-27 18:40:14 +00:00
errCannotSend
2013-08-23 01:03:37 +00:00
)